RE: [PHP] Update statement?

From: Date: Fri, 20 Oct 2000 00:38:13 +0000
Subject: RE: [PHP] Update statement?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21308@lists.php.net to get a copy of this message
On Thu, 19 Oct 2000, Wee Chua wrote: > Hi james, > I tried your if statement and it didn't work correctly, would you correct my > if statement if that's anything wrong. And how could display the error > message if mysql_error() contains one? Thank you. > > > if(!$update = mysql_query("update Employee set Name='John' where > Id=1",$db))die("Error updateding > records.<BR>".mysql_error($db).""); > if (mysql_error($db)){ > echo "Row not updated"; > } else { > echo "Row updated";} > > > calvin Perhaps you should go and read the manual entry for mysql_error for tips on how to use it. And please do not cross post your problems to multiple lists. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#21308) next »