I believe as long as the update was successful (no errors) it will say
'message if successful'...I think you are wanting to know if rows were
updated or not...not whether or not the query ran ok.

Eddie

-----Original Message-----
From: Sunfire [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 04, 2003 3:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] testing a query for success--code doesnt work


hi..
posted a message about what the code was to test an update query to see if
it was successfull using mysql and i tested my code and for some reason even
if none of the fields were updated it still reports the success message...

heres the code i have:
$query=mysql_query("update members set company="\$company\", ........);
if($query){
message if successfull...
}
else{
message if not or if failed..//never gets used
}
anybody know why this doesnt work if 0 records were changed?



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to