Re: PHP Update query

From: Date: Tue, 03 Nov 2009 06:15:06 +0000
Subject: Re: PHP Update query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-46620@lists.php.net to get a copy of this message
On Tuesday 03 November 2009 11:29 AM, 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); ??? Ron From the manual page:
"For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc, *mysql_query()* returns *TRUE* on success or *FALSE* on error. " If $client_result == true you know the query was successful. -- With warm regards, Sudheer. S Tech stuff: http://techchorus.net Business: http://binaryvibes.co.in

« previous php.db (#46620) next »