Click to See Complete Forum and Search --> : MySQL syntax help.


the tree
09-05-2005, 06:57 AM
Hey
I'm this is simple but I can't see what's up.'UPDATE `pages` SET `title`=\''.$_POST['title'].'\' `content`= \''.addslashes($_POST['content']).'\' WHERE `refer` = "'.$_POST['p'].'"'I'm getting this error message: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 'content`= ' {{some of $_POST['content']}} 'Can any see what I'm doing wrong?

NogDog
09-05-2005, 10:24 AM
You need a comma between the two values being set, i.e. right before `content`=....

the tree
09-05-2005, 11:04 AM
ta' very much.