MySQL Forums
Forum List  »  PHP

Re: Trouble with updating Mysql table data
Posted by: Lanze Langill
Date: March 22, 2012 07:56AM

Hello,

Try using " instead of ' as your string enclosure. Also I noticed in your example code you were missing the WHERE clause. ( index = '" . $search . "'"; )

$data = "SELECT * FROM library WHERE index = '" . $search . "'";

$data = "UPDATE library SET title = '" . $Title . "', author = '" . $Author . "' WHERE index = '" . $search . "'"; <-- Try something like htis.

Options: ReplyQuote


Subject
Written By
Posted
Re: Trouble with updating Mysql table data
March 22, 2012 07:56AM


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.