Re: SQL update help

From: Date: Sat, 21 Sep 2002 00:07:31 +0000
Subject: Re: SQL update help
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21884@lists.php.net to get a copy of this message
Jeffrey is right, but here's an easier way: $sql = "UPDATE $table SET pages = '$PHP_SELF' WHERE session = '$holy_cow'"; Be sure you use double-quotes to build the string (so that all variables get interpolated) and single-quotes within. Any non-numeric value has to be quoted for an SQL statement to work properly. Good luck! --Dave Jeffrey_N_Dyke@Keane.com wrote:
if you put quotes around the variable $PHP_SELF it should work...try this. UPDATE $table SET pages = '".$PHP_SELF."' WHERE session = $holy_cow hth


« previous php.db (#21884) next »