Re: Mysqli issue
| From: | Chris | Date: | Fri, 12 Sep 2008 06:54:43 +0000 |
| Subject: | Re: Mysqli issue | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-279932@lists.php.net to get a copy of this message | ||
Jason Pruim wrote:
No political undertones in this one I promise! :)
Attempting to setup a prepared statement in php that will update a record in a mysql database using mysqli
Here is the relevant code:
$stmt = mysqli_stmt_init($link);
mysqli_stmt_prepare($stmt, "UPDATE purl.schreur (FName, LName, email, phone, record, subscribed, date, IPAddress, Business, Address1, City, State, Zip, Coffee, Meeting, areaPlans) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
That's an insert query.
An update query is:
update table set field1=value1, field2=value2 etc where id='X';
--
Postgresql & php tutorials
http://www.designmagick.com/