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
|
|
|
 |
|