I'm building chat application. In the chat screen I want to display last 20 message and if we scroll up, it will load older message. Could anyone bring me SQL query string to load next 10 last records?
This is my SQL string to load last 20 records:
SELECT *FROM (SELECT * FROM tbl_chat_content ORDER BY message_id DESC LIMIT 10) AS TEMP ORDER BY TEMP.message_id ASC
Aucun commentaire:
Enregistrer un commentaire