以下面为例:
SELECT
*
FROM
auctions AS a
LEFT JOIN winners AS w ON a.auction_id=w.auction_id
WHERE
a.active=1
AND
a.approved=1
GROUP BY
a.auction_id
ORDER BY
a.start_time DESC
LIMIT
0, 10;
有时这可能会匹配winners
表中的多个结果;我不需要它们,但是如果有多个匹配项,我想控制我得到的行。我怎样才能ORDER BY
在获胜者表上进行操作,以确保我想要的行是第一行?