這是我的表MySQL查詢組由獲得最後一個ID
id | sender | receiver | msg
-----------------------------
1 | jon | jack | buzz ...
2 | jack | jon | ?
3 | adel | jon | met me soon
4 | jon | adel | okay
5 | alex | jon | where ar u ?
6 | jon | adel | okay
7 | adel | alex | don't forget the party
8 | jon | jack | may i borrow ur car
9 | alex | adel | of course
10 | jack | jon | ok
11 | jack | jon | watch the gas
12 | alex | jon | i'm dying here
13 | jon | alex | 5 mnt ..
,我希望得到名單喬恩的最後一封郵件與他的朋友這樣
id | sender | receiver | msg
-------------------------------------------
13 | jon | alex | 5 mnt ..
11 | jack | jon | watch the gas
6 | jon | adel | okay
如何查詢,得到那結果?
NB,,,我只需要3記錄.. – timenz 2012-07-11 08:12:50
你看了我的查詢? :s – 2012-07-11 08:17:54