我有以下查询:
MySQL_Query(
"SELECT COALESCE(`from`,`to`) AS `userid`, `id`, `from`, `to`, `type`, `datum`, `read`, `message`
FROM `messages`
WHERE `to`='".$user->id."'
AND `from` NOT IN
(SELECT `user` FROM `ignore` WHERE `idu`='".$user->id."')
OR `from`='".$user->id."'
GROUP BY `userid` ORDER BY `id` DESC"
);
我拥有的最高ID为128,但PHP返回ID = 5的行。我该如何解决这个问题?