mb
|
| Posted: 10/28/2002, 6:17 PM |
|
I would like to have a search redirected to a page with record form when the search result returns no records found
Can someone help
CCS 1.0.7 and php
|
|
|
 |
Nicole
|
| Posted: 10/30/2002, 6:19 AM |
|
Hello,
To find if the recordset is empty you should open new connection in the form Before Show event and execute the same query as used for the grid form. Check if returned recordset is empty and then redirect user if it is. Here is sample code:
global $form_name;
$conn = new clsDBconnection_name();
$conn->query(CCBuildSQL($form_name->ds->SQL, $ form_name->ds->Where, $ form_name->ds->Order));
if (!$conn->next_record())
header("Location: AnyPage.php");
|
|
|
 |
|