~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
If the transaction is set at 'sub' it works perfectly, however when it is 'main' it gives me an error:
Could not update page; 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 'desc='H', content='t' WHERE id='1'' at line 1
I have no idea what my problem is... Any ideas?
Thanks!
luke
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
Last edited by the9ulaire on Sun Apr 13, 2008 1:12 pm, edited 1 time in total.
UPDATE main_pages SET name='t', desc='t', content='t' WHERE id=1Could not update page; 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 'desc='t', content='t' WHERE id=1' at line 1
DESC is a reserved word in MySql, so it doesn't see it as a field name, but something that shouldn't be there
To make your statement work, surround your field names with backticks:
I tried putting it in single quotes but it still didn't work. I instead went in and changed all my column names and gave them the prefix main_ and now everything works perfectly!