19 Jun 2018 14:27:20 Bruce Wilkie posted:
How do I use Count() and group by in App connect to create the following query?
SELECT ddmc_gallery.*, COUNT(ddmc_gallery_pic.gallerypicid) AS pictotal, ddmc_gallery_pic.`gallerypicfile`
LEFT JOIN ddmc_gallery_pic ON ddmc_gallery.galleryid = ddmc_gallery_pic.galleryid
WHERE (ddmc_gallery.fixtureid = '' OR ddmc_gallery.fixtureid IS NULL) AND (ddmc_gallery.sectionid = '' OR ddmc_gallery.sectionid IS NULL)
GROUP BY ddmc_gallery.galleryid
ORDER BY ddmc_gallery.gallerytitle ASC;
I can do all apart from the Count() and GROUP BY elements
I've found Group By in App Connect but I can't test if it's working properly without the 'Count()' part as well.
thanks in advance