FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

pls help about mysql errorr

 


akoni176
this is an error msg display when i send this command.. if somebody knows this problem im very thankful to you..

MySQL said:

#1064 - 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 'mysql_query("UPDATE memosto SET status='1' WHERE ID = 16")' at


thank in advance...
chris20
try removing the single quotes around the 1, so status = 1
hexkid
akoni176 wrote:
#1064 - 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 'mysql_query("UPDATE memosto SET status='1' WHERE ID = 16")' at

What's the PHP statement that executes that query?

I suspect you have something like
Code:
$sql = "mysql_query(\"UPDATE memosto SET status='1' WHERE ID = 16\")";
$resource = mysql_query($sql);


If my suspicion is right, try this instead
Code:
$sql = "UPDATE memosto SET status='1' WHERE ID = 16";
$resource = mysql_query($sql);
akoni176
thanks hexkid,,, ur great..

What's the PHP statement that executes that query?

I suspect you have something like
Code:
$sql = "mysql_query(\"UPDATE memosto SET status='1' WHERE ID = 16\")";
$resource = mysql_query($sql);


If my suspicion is right, try this instead
Code:
$sql = "UPDATE memosto SET status='1' WHERE ID = 16";
$resource = mysql_query($sql);


absolutely right... thanks again...
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.