What\'s the best, and easiest way to do this? My query currently is:
SELECT * FROM chat WHERE (userID = $session AND toID = $friendID) OR (use
First select the last 10 from the table, then re-order them in ascending order.
SELECT * FROM (SELECT * FROM table ORDER BY id DESC LIMIT 10) sub ORDER BY id ASC