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" <[EMAIL PROTECTED]>
>To: <[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
>>correct?
>>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to