Re: Writing MySQL Update Query with NULL value

From: Date: Mon, 14 Apr 2008 13:57:37 +0000
Subject: Re: Writing MySQL Update Query with NULL value
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-272971@lists.php.net to get a copy of this message
At 1:42 PM +1000 4/14/08, Chris wrote:
Your query should end up looking like: $query = "UPDATE phones set last_name='${last_name}', first_name='${first_name}' ..., suffix=${suffix}";
Why not this: $query = "UPDATE phones set last_name='$last_name', first_name='$first_name' ..., suffix=$suffix"; Why the "{}"? Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#272971) next »