Pinchas
|
| Posted: 10/07/2002, 11:58 AM |
|
CC2 question
Is there a way to avoid from displaying a grid form if there are no records to display in the recordset?
|
|
|
 |
Nicole
|
| Posted: 10/08/2002, 7:10 AM |
|
Pinchas,
To find if the returned recordset is empty you should execute the query in the Open event of the form, and depending on it hide the form. Here is PHP code example:
//execute query:
$db->query($sSQL.$sWhere.$sOrder);
$next_record = $db->next_record();
if (!$next_record)
{
$tpl->SetVar("Form<form_name>", "");
return;
}
Note, it is available in the template version.
|
|
|
 |
|