Re: PHP Update query

From: Date: Tue, 03 Nov 2009 06:09:05 +0000
Subject: Re: PHP Update query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-46618@lists.php.net to get a copy of this message
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/

« previous php.db (#46618) next »