CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 CCS display form depending on number of records

Print topic Send  topic

Author Message
michael weaver
Posted: 10/24/2002, 10:40 AM

I'm having a little trouble with this one. I'm trying to tell a form not to
display if there are no records returned in CCS. Using php+mysql. Form name
"events."

In After Initialize, I have placed the following:


//Custom Code @28-2A29BDB7
// -------------------------
global $events;
$num_records = $events->ds->RecordsCount;
// echo $num_records;
if ($num_records>0) {} else {
$events->Visible = false;
}
// -------------------------
//End Custom Code

The sql for the form events is this:

SELECT id, title, date, LEFT(description,500) as description
FROM events
WHERE featured='1' AND date >= NOW()
ORDER BY date LIMIT 5

If I run the SQL I get one record returned, but the custom code I put in
After Initialize always returns the value of 0, so the form won't show up if
there are records available.

Can anyone help? Thanks!

michael


   


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.