I have a table named medOrder. In this table I have orders. One order has many wishes. I tried to write a query that shows one record and all the names of the wishes but I don’t think the query is as good as it could be.
SELECT m.ordcode as koden, w.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='7265'
WHERE m.ordNR=c.ordNR AND m.meaID=r.meaID AND m.wishesID=w.id
AND r.catID=k.catID
ORDER BY m.ordcode DESC;

Try this query:
This query does
GROUP BYon all the repeating columns but concatenate values for the non-repeating column ofwish.