這應該相當簡單,但我堅持使用它。選擇用戶或用戶發送的郵件
當我做查詢
SELECT * FROM `inbox` where toid=4 or fromid=4 order by time desc
,我得到:
id toid fromid message time
23 48101 4 hello call me 12/23/2011 12:27
6 34584 4 hi there 12/22/2011 15:42
5 34584 4 how are you 12/22/2011 14:08
4 34584 4 say hello 12/22/2011 14:07
3 34584 4 whats up 12/22/2011 14:07
2 4 34584 nice picture 11/24/2010 0:00
1 4 2 this is very interesting! 12/23/2008 0:00
現在,我需要組用戶4和其他用戶的每個之間的對話,以一排與最後的消息(如Facebook消息)。
沒有人知道最好的方法嗎?
謝謝!
請提供給定的輸入 –
u能提供你想要的,什麼結果,現在你所得到的樣品輸出? –
我想你想查看部分不查詢你會獲取所有的用戶4的對話,但點擊頂部的消息剩餘的消息應該來一些jquery的東西是正確的 –