MySQL Forums
Forum List  »  PHP

Re: Trouble with updating Mysql table data
Posted by: Rick James
Date: March 24, 2012 09:53PM

PHP is happy to "interpolate:
$sql = "UPDATE library SET title = '" . $Title . "', author = '" . $Author . "', status = '" . $Status . "', WHERE id = $Id ";
-->
$sql = "UPDATE library SET title = '$Title', author = '$Author', status = '$Status' WHERE id = $Id ";
(I removed the spurious comma, too.)

Options: ReplyQuote


Subject
Written By
Posted
Re: Trouble with updating Mysql table data
March 24, 2012 09:53PM


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.