CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Sorting on more than one column

Print topic Send  topic

Author Message
Jeff Swanson
Posted: 08/02/2002, 5:46 AM

I want to be able to sort the colums in a grid so that there is the primary sort and then the secondary sort. i.e. Column one sorts by the racing 'class' and then also sort by race number. So all the classes are together and then within those classes, all race numbers are together. How do I do this without writing a custom sql statement? I want to be able to leave the ability to resort via the column headers.
Nicole
Posted: 08/05/2002, 6:55 AM

Jeff,
- CC solution
you can add secondary sort code to sOrder variable (that stores the sort order) in form Open event. Here is PHP example:
$sOrder .=", race_number ASC";
or
$sOrder .=", race_number ". $Direction;
- CCS solution
create Before Build Select event in order to create additional sorting. PHP example:
global $page_name;
$page_name->ds->Order .= ", race_number DESC";

Jeff Swanson
Posted: 08/05/2002, 7:31 PM

Perfect, this worked. Thanks.

   


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

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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