Co powiesz na coś takiego
SELECT DISTINCT messages.fromid,
messages.readed,
messages.fromid,
messages.toid ,
members.id AS pid
FROM messages
INNER JOIN members
ON members.id = messages.fromid
WHERE messages.toid = ".$mid."
AND members.status = 7
AND messages.kreaded !='1'
AND messages.subject != 'readed'
ORDER BY messages.fromid ASC,
messages.id DESC
LUB
SELECT DISTINCT messages.fromid,
messages.readed,
messages.fromid,
messages.toid ,
members.id AS pid
FROM messages
INNER JOIN members
ON members.id = messages.fromid
WHERE messages.toid = ".$mid."
AND members.status = 7
AND messages.kreaded !='1'
AND messages.subject != 'readed'
ORDER BY messages.fromid ASC,
messages.sendtime DESC
W messages.fromid ASC ASC jest czysto syntaktycznie, ponieważ ORDER BY bez podania ASC/DESC zakłada ASC.
SELECT *
FROM TABLE
ORDER BY COL ASC
jest taki sam jak
SELECT *
FROM TABLE
ORDER BY COL