DMXzone App Connect Support Product Page
Answered
How do I use count and group by?
Asked 19 Jun 2018 14:27:20
1
has this question
19 Jun 2018 14:27:20 Bruce Wilkie posted:
Hi thereHow 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`
FROM ddmc_gallery
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
Bruce
Replies
Replied 20 Jun 2018 10:49:20
20 Jun 2018 10:49:20 Teodor Kuduschiev replied:
Hello Bruce,
What should be the end result on your page?
What should be the end result on your page?
Replied 22 Jun 2018 09:06:46
22 Jun 2018 09:06:46 Bruce Wilkie replied:
Hi Teodor
I want to be able to count records that I've grouped together under titles
Bruce
I want to be able to count records that I've grouped together under titles
Bruce
Replied 22 Jun 2018 09:54:21
22 Jun 2018 09:54:21 Teodor Kuduschiev replied:
This is already explained in App Connect manual: www.dmxzone.com/go/32971/using-the-group-by-filter
Replied 25 Jun 2018 11:28:16
25 Jun 2018 11:28:16 Bruce Wilkie replied:
Thanks Teodor
It's not working and I can't put my reply here as it's blocking me from posting for some reason.
Will have to create a screenshot of my reply and try to link it for you
It's not working and I can't put my reply here as it's blocking me from posting for some reason.
Will have to create a screenshot of my reply and try to link it for you
Replied 25 Jun 2018 11:31:20
25 Jun 2018 11:31:20 Bruce Wilkie replied:
Replied 25 Jun 2018 11:46:20
25 Jun 2018 11:46:20 Teodor Kuduschiev replied:
I am not quite sure i understand what property are you grouping by and what property you want to show? the $key returns the property you are grouping by - not anything other.
You don't see thumbnails as you have not properly added them inside the repeat ... the video shows you need to nest another repeater inside the main one. Just follow it - the video couldn't be more detailed than that.
You don't see thumbnails as you have not properly added them inside the repeat ... the video shows you need to nest another repeater inside the main one. Just follow it - the video couldn't be more detailed than that.
Replied 25 Jun 2018 15:13:30
25 Jun 2018 15:13:30 Bruce Wilkie replied:
Replied 25 Jun 2018 15:14:06
25 Jun 2018 15:14:06 Bruce Wilkie replied:
(sorry, had to do a screenshot again - still getting text blocked)