J
|
Jane 7/7/2006 |
Hi, function BeforeEdit(&$values, $where) { // Parameters: // $values - Array object. // Each field on the Edit form represented as 'Field name'-'Field value' pair // $where - string with WHERE clause pointing to record to be edited //** Check if specific record exists **** global $conn; $strSQLExists = "select * from AnyTable where AnyColumn='AnyValue'"; $rsExists = db_query($strSQLExists,$conn); $data=db_fetch_array($rsExists); if($data) { // if record exists do something } else { // if dont exist do something else } return true; // return true if you like to proceed with editing this record // return false in other case } |