DMXzone Database Connector PHP Support Product Page


Record grouping

Asked 26 Sep 2013 23:20:52
have this question
26 Sep 2013 23:20:52 Joe Horton posted:
Is it possible to group records by column through the database connector?

Also is it possible to actually set PHP variables from these sources?


Replied 27 Sep 2013 07:39:21
27 Sep 2013 07:39:21 Teodor Kuduschiev replied:
Hi Joe,
Can you please be a little more detailed what do you mean by grouping? Do you mean Sorting?
Replied 27 Sep 2013 07:56:43
27 Sep 2013 07:56:43 Joe Horton replied:
For example. If I have two tables with an right join, let's say I have a gallery. And I have the gallery categories and I want to have the categories show up with a picture from each category. So I have the pictures table joined to the gallery category table. Well now if I have two pictures in one category it repeats that category heading twice. Well in previous record sets I could group them category together and that would fix it. So what's the best way to do that.

Also if I have let's say five categories and only one has pictures so far I get a broken image on the other four because I don't have a show if picture column has file option
Instead if I choose if not null now those category headings won't show. Just the ones that also have pictures depending on how I do a table join.

I had issue purchasing this extension at this price but I saw the potential of it and took the jump. It's suppose to make things easier but so far it's frustrating that I can't do if statements outside of the record set. Example if($row_record['category'] == "sandwich"{ echo 'whatever';}

Hope that makes sense.
Replied 27 Sep 2013 08:07:31
27 Sep 2013 08:07:31 Chris Sanders replied:
I agree, the group option is critical to a lot of queries as is the statement outside the recordset. I'm still in a mode of having to switch between this and the conventional method at the moment.

It's getting there though.
Replied 30 Sep 2013 08:03:06
30 Sep 2013 08:03:06 Teodor Kuduschiev replied:
The grouping options will be included in the next Database Connector updates.
Replied 14 Apr 2015 23:00:22
14 Apr 2015 23:00:22 Daniel Visbal replied:

Still, there is no GROUP BY, and the necessary aggregate functions for that on the Database Source Query Builder...
Any time soon?
Replied 15 Apr 2015 06:49:25
15 Apr 2015 06:49:25 Teodor Kuduschiev replied:
Hello Daniel,
As i explained you in the Live Chat yesterday, the Group By filter is included in the HTML5 Data Bindings formatter extension:
Replied 15 Apr 2015 14:41:05
15 Apr 2015 14:41:05 Daniel Visbal replied:
The GROUP BY on the Data Bindings is not the same as for GROUP BY on a DB SQL.

Also, if using that on Data Bindings, all the process is done at the browser.
In the case of a Table with million of records, the data will hve to travel to the remote location, and all the process will be at the user browser.
I do have a table with more than 5M records, and all I need if to get a summary based on Code and Last date updated.
select code,subcode,max(date) from table group by code,subcode
This returns only 20 records.

Reply to this topic