Jump to content


This topic is now archived and is closed to further replies.


Don't see whats wrong with PHP + MySql Query here..

Recommended Posts

I run this code..[code]mysql_query("UPDATE bf SET price='$price'  WHERE location='$fetch->location' &&owner='$username' && name='$store2'");[/code]
and it runs perfectly.. then i copy paste it, change price to order.. it doesn't work..
[code]mysql_query("UPDATE bf SET order='$order' WHERE Name='$store2' && owner='$username' && location='$fetch->location'")
The mysql table is set the same,and the $order does work.. if i put 10, then echo $order; it works perfectly..

Share this post

Link to post
Share on other sites
ORDER is a reserved word - http://htmlite.com/mysql002a.php

You can't name a table column with a reserved word.  The best solution is to change order to x_order or some non-reserved word.  You can also (sloppy solution) wrap reserved words with backticks ... `order`

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.