javauser
Posts: 4
|
| Posted: 01/22/2007, 5:38 AM |
|
Please help me with this problem (CCS 2.3.2.24 / mysql):
I have a grid filled from a select statement with "... group by substr(my_field,1,2) ..." and pagination doesn't work.
I've tried that statement without that aggregation and pagination works fine.
Any ideas?
Thanks in advance.
|
 |
 |
javauser
Posts: 4
|
| Posted: 01/22/2007, 5:56 AM |
|
Found a solution:
(PHP) $grid_name->ds->CountSQL = "select count(*) from (".$grid_name->ds->SQL.") luv_j_alba";
Put that in the beforesbuildselect event.
It also allows nested queries to populate grids (those are not properly parsed when building the count(*) for pagination).
But I'm sure there must be a better solution ...
|
 |
 |
|