DMXzone App Connect Support Product Page

This topic was archived by Teodor Kuduschiev on 8/24/2018 12:13:04 PM

How do I control display order of database records after using GROUP BY in App Connect?

Asked 23 Aug 2018 08:37:33
1
has this question
23 Aug 2018 08:37:33 Bruce Wilkie posted:
Hi there

I have some photo albums listed on a page.
Each photo album has a thumbnail and a number showing how many photos are in the album.
I achieved this using GROUP BY in the repeat regeon in App Connect, following my previous question on the DMX support forums at www.dmxzone.com/support/32763/topic/64474 and the DMX manual video at www.dmxzone.com/go/32971/using-the-group-by-filter

However, the photo albums are showing on the page in ascending order of the primary key for the albums in the database (primary key is galleryid).

I've set the ORDER BY to 'galleryid DESC' in the Database Query of the Server Action in Server Connect, but the galleries are still showing in ascending order. I tried switching to ORDER BY galleryid ASC to see if that changed anything but it doesn't.

Is there something in App Connect that overrides the ORDER BY that I set in the Database Query in Server Connect?

Or is there some other way that I can reverse the order of the picture galleries so that the most recently added to the database appears at the top?

thanks in advance
Bruce

Reply to this topic