MySQL Forums
Forum List  »  PHP

Database not updating through PHP, problem with MySQL query?
Posted by: Nik Kolusion
Date: September 20, 2011 11:19PM

I have a MySQL query that PHP parses successfully, and I have a problem where the query does not update the MySQL database, when it should be doing so.

I suspect this problem is caused by the way I've implemented PHP into the MySQL query, but I an not sure and wondering if anyone can see any problem with my MySQL syntaxes, etc? They look fine to me, I've gone over this piece of code thought out earlier hours of the morning and still today can't find a solution. :S

This is code I am using - query through PHP (which draws post data from HTML):

$query = "UPDATE `products` set `category` = '".$_POST['category']."' where `id` = '".$_POST['id']."'";

Options: ReplyQuote


Subject
Written By
Posted
Database not updating through PHP, problem with MySQL query?
September 20, 2011 11:19PM


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.