CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 CCS - Order by multiple tables

Print topic Send  topic

Author Message
Jake
Posted: 06/24/2002, 9:48 AM

I'm trying to figure out how to do a grid sort in CCS like the one I used to do in CC, where I am sorting primarily by a priority field in a table other than the one being displayed by the grid, and secondarily by a priority field in the current grid table. Here's the code I use in CC (PHP/MySQL):

//-------------------------------
// Build base SQL statement <-- Generated by CC
//-------------------------------
$sSQL = "select f.answer as f_answer, " .
"f.cat_num as f_cat_num, " .
"f.faq_num as f_faq_num, " .
"f.priority as f_priority, " .
"f.question as f_question, " .
"f.tag as f_tag, " .
"f1.cat_num as f1_cat_num, " .
"f1.description as f1_description " .
" from faqs f, faq_cats f1" .
" where f1.cat_num=f.cat_num ";
//-------------------------------

//-------------------------------
// FAQs Open Event begin <-- I added line below
$sOrder = "order by f1.priority ASC, f.priority ASC";

--------------
I gather that I need add some code in the BeforeShow event (or should I modify the raw code?) to set a new SetOrder perhaps? However, while I can see how that can be easily done with fields in the current grid table, I'm at a loss at how to do this with fields from multiple tables.

Jake
Jake
Posted: 06/24/2002, 1:19 PM

I managed to answer my own question after stumbling across the CCS Reference Manual on the CodeCharge Web site, and find the reference to the Query Builder for the Data Source. Very nice new feature!!!

Jake

   


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

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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