Re: UPDATE mysql

From: Date: Sat, 22 Jun 2002 19:43:05 +0000
Subject: Re: UPDATE mysql
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-103422@lists.php.net to get a copy of this message
Actually, it looks to me like you're missing a semicolon terminating your SQL statement. Try this: $query="update $table set field1='$var1' where id='$id';"; 1LT John W. Holmes wrote:
It's correct for PHP, but there's no telling what MySQL is actually recieving. ----- Original Message ----- From: "Phil Schwarzmann" <pschwar@jhmi.edu> To: <php-general@lists.php.net> Sent: Saturday, June 22, 2002 2:44 PM Subject: [PHP] UPDATE mysql
I can't get UPDATE to work properly when querying MySQL. $query = "UPDATE $table SET field1='$var1' WHERE id='$id'"; I want to update one field of one row in a table. Is this syntax correct?


« previous php.general (#103422) next »