Mysql error in php code

Posted by Ockonal on Stack Overflow See other posts from Stack Overflow or by Ockonal
Published on 2010-04-14T15:29:58Z Indexed on 2010/04/14 15:32 UTC
Read the original article Hit count: 348

Filed under:
|

Hello, can't understand mysql error:

UPDATE static_pages SET order = " Some new data 222222

"Database error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order = "

$query = 'UPDATE someTable SET '.$key.' = "'.$value.'"';

Here is $key = order; $value = 'new data 222222'; There is such keys in table: order, prices, contacts. Each of these updates well except the 'order'. Why?

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php