J
|
Jane 1/9/2007 |
Here is a sample code of the ViewOnLoad event: function ViewOnLoad() { global $where; global $conn; $strSQLExists = "select * from TableName where ".$where; $rsExists = db_query($strSQLExists,$conn); $data=db_fetch_array($rsExists); if($data["FieldName"]=="your value") { // if record exists do something $strUpdate = "update TableName set FieldName='your new value'"; db_exec($strUpdate,$conn); } else { // if dont exist do something else } } |
D
|
datapimp author 1/9/2007 |
Thanks soooooooooo much Jane for the speedy reply ... it work first go :-) |