Ik kom er niet meer uit, eerst had lukte het me bij een script maar ik ben alweer vergeten hoe.
Ik heb een script met categorieen en daaronder moeten items komen, dus dit:
Shahiem
- Koek
- Koek
Jan
- Vlees
- Afval
Nou wil ik dat in 1 query doen.
SELECT sl.factuurnummer AS factuurnummer, sc.naam
FROM inkoop_factuur sl
JOIN projecten_adressen sc ON sc.project_id =10
AND sc.verwijderd =0
ORDER BY sc.naam
Categorienaam zet ik trouwens ook in de while.
Resultaat
Quote:
Allround Printing 80403-1060372 s
Allround Printing 110165-1264 s
Allround Printing F2011215417WD s
Allround Printing 6076565290018008A s
Allround Printing 6076565290018008AC-4-4-2011 s
Allround Printing 2012123 s
Allround Printing 2.012.245 s
Allround Printing 2 s
Allround Printing 2011208 s
Allround Printing 6001117232568001AC s
Allround Printing MA9611128-2-9-2011 s
Allround Printing 12700457 s
Allround Printing 0111433665 s
Allround Printing 20110210 s
Allround Printing 2.012.244 s
Je zou kunnen zeggen dat ik GROUP BY zou kunnen gebruiken, maar dan werkt het ook niet. Wie kan mij helpen?
Resultaat van GROUP BY
Quote:
Allround Printing 20111121 s
Axender Eindhoven 20111121 s
Bol.com 20111121 s
CARNAVALS VERENIGING.NL 20111121 s
CV Striepersgat 20111121 s
De Wit Designs 20111121 s
Drukkerij Schoenmakers 20111121 s
Een plus een reclame 20111121 s
Google Adwords 20111121 s
KVK Eindhoven 20111121 s
Liteserver 20111121 s
Marktplaats 20111121 s
meeus 20111121 s
Multivlaai BV 20111121 s
Omotion 20111121 s
People and Print (drukwerkdeal) 20111121 s
Polycorp Media 20111121 s
Regionale Radio Groep 20111121 s
Telephonique 20111121 s
TRANSIP B.V 20111121 s
UPC Nederland 20111121 s
Webzo Media 20111121 s
Wil Geven 20111121 s