这是我的查询
$offers_with_limit = $db->query("
SELECT *
FROM `offers`
WHERE `countries` LIKE '%'?'%'
AND `category` = '$query2'
AND NOT EXISTS
(SELECT *
FROM completed
WHERE completed.offer_id = offers.id
AND completed.user = ?)
AND NOT EXISTS
(SELECT *
FROM pending
WHERE pending.offer_id = offers.id
AND pending.user = ?)
AND NOT EXISTS
(SELECT *
FROM ignored
WHERE ignored.offer_id = offers.id
AND ignored.user = ?)
AND `active` = '1'
AND `hard_incent` > '0'
ORDER BY `hard_incent` ASC,
`date_added` DESC LIMIT $startpoint,$limit
");
显然,它只会显示大于 0 的行,但我还需要它在大于我不添加的行之后继续显示等于 0 的行,hard_incent > '0'
那么它显示的行首先等于 0,因为它们是ASC
有序的。