MySQL Forums
Forum List  »  PHP

Re: Problems with UPDATE
Posted by: Jonathan Stephens
Date: June 10, 2005 06:26AM

You need to quote string values:

$query = "UPDATE tidbokning SET " .$_POST[uppdatera]. "= '$info_to_update' WHERE id = '1'";

Also, if your id column is a primary key, there is no need to use the LIMIT clause. :)

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote


Subject
Written By
Posted
June 10, 2005 03:35AM
Re: Problems with UPDATE
June 10, 2005 06:26AM
June 11, 2005 10:02AM
June 11, 2005 01:10PM


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.