我有一个 MYSQL 查询,他必须列出我希望它发布的所有帖子。但它不这样做。当我在表“meaOrder”中有一个以上具有相同“ordCode”的帖子时,它会显示帖子。但是当我只在 meaOrder 中发布时,我不会显示它。我能做些什么?
SELECT koden, wish, rnamn, bild, pris, cname, onsktext
FROM (
SELECT m.wishText as onsktext, m.meaOID as midn, m.ordcode as koden, w.wish as wish, r.meaName as rnamn, r.meaImg as bild,
r.meaPrice as pris, k.catName as cname from cats k, meals r, wishes w,
meaOrder m
join orders c on c.ordNR=4401
WHERE c.ordStatus=1 AND m.ordNR=c.ordNR AND m.meaID=r.meaID AND m.wishesID=w.id
AND r.catID=k.catID
) T
GROUP BY koden, rnamn, bild, pris, cname
ORDER BY midn DESC
TABLE 订单 http://grab.by/m74E
表 meaOrder http://grab.by/m74Q