It's correct for PHP, but there's no telling what MySQL is actually
recieving. Are you sure all of those variables have values?? Yeah? Are you
really sure??

Use mysql_error() with your query.

$result = mysql_query("UPDATE ...") or die("Error in update: " .

---John Holmes...
----- 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
> correct?

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to