Re: UPDATE Not Updating

From: Date: Wed, 01 Aug 2001 21:29:59 +0000
Subject: Re: UPDATE Not Updating
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10974@lists.php.net to get a copy of this message
At 5:24 PM -0400 8/1/01, Steve Fitzgerald wrote:
I belive this UPDATE should work, but it isn't. I get no errors. I have also tried using FieldName= '$Fieldname', but that does not seem to work either.
Try your WHERE clause with a SELECT statement and see if it's actually matching any rows.
$table_name = "contacts"; $update_contact_sql = "UPDATE $table_name SET FirstName =\"$FirstName\", LastName = \"$LastName\", Title = \"$Title\", WorkPhone = \"$WorkPhone\", HomePhone = \"$HomePhone\", Mobile = \"$Mobile\", EmailName = \"$EmailName\", Birthday = \"$Birthday\" WHERE ContactID = \"$ContactID\" "; $result = @mysql_query($update_contact_sql, $connection) or die ("Couldn't execute query.");
-- Paul DuBois, paul@snake.net

« previous php.db (#10974) next »