MySQL Forums
Forum List  »  PHP

Help with a bad query
Posted by: J Kahn
Date: August 16, 2005 07:30AM

I've created a database called signs with a table called data in it, and I'm trying to update rows. I've run the following statements both from a php file and inside phpmyadmin itself, and both come up with the same result: No errors are displayed but the records don't change.

From the file,

$query="UPDATE data SET status='$status' AND history='$history' WHERE jobnum='$jobnum'";

or in php my admin,

UPDATE data SET status='2' AND history='edited' WHERE jobnum='5'

I can't understand why the statment is wrong, can anyone help?

Options: ReplyQuote

Written By
Help with a bad query
August 16, 2005 07:30AM
August 16, 2005 08:15AM
August 16, 2005 08:35AM
August 16, 2005 08:39AM
August 16, 2005 08:44AM
August 16, 2005 08:51AM
August 16, 2005 10:25AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.