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
>----- Original Message -----
>From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
>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

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to