Ron Piggott wrote:
How do I test if an UPDATE query worked
$query = "UPDATE `clients` SET `company` = '$company', `contact` =
'$contact', `phone` = '$phone', `city` = '$city' WHERE
`clients`.`reference` =$client LIMIT 1";
$client_result=mysql_query($query);
???
http://www.php.net/manual/en/function.mysql-affected-rows.php
If it returns 0 that could mean:
- no row was originally found with that condition
or
- no update was performed (the data stayed the same)
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php