CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Pagination bug when grouping by calculated field?

Print topic Send  topic

Author Message
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.
View profile  Send private message
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 ...
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.