SELECT `Chat`.`id`,
`Chat`.`sender_id`,
`Chat`.`receiver_id`,
`Chat`.`message`,
`Chat`.`datetime`,
`Chat`.`converstation_id`
FROM `gopher`.`chat` AS `Chat`
WHERE ((`Chat`.`sender_id` = 10)
OR (`Chat`.`receiver_id` = 10))
GROUP BY converstation_id
ORDER BY `Chat`.`id` DESC
但這裏爲了現在不工作,這是我得到的結果運行以上查詢後
使用順序你需要刪除'GROUP BY conversation_id' 。 – MrDarkLynx
'ORDER BY DESC LIMIT 1'就是這樣。你爲什麼需要'GROUP BY'? –
你期待/想要發生什麼? – Ilion