I'm a novice, so bear with me.
I'm trying to use a query string that has worked fine for me in the past, however, I'm now using mysql 5 which may be causing the problem, or not.
I've tried various versions of this with still no joy.
Here is my mysql_error message...
Query failed:
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='Page Description', keywords='Page Keywords', content='
Page content html' at line 1
Here is my code
many thanks in advance.
I'm trying to use a query string that has worked fine for me in the past, however, I'm now using mysql 5 which may be causing the problem, or not.
I've tried various versions of this with still no joy.
Here is my mysql_error message...
Query failed:
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='Page Description', keywords='Page Keywords', content='
Page content html' at line 1
Here is my code
Code:
$str = "UPDATE pages SET title='".$pagetitle."', desc='".$pagedescription."', keywords='".$pagekeywords."', content='".$pagecontent."' WHERE id = '1'";
mysql_query($str) or die("Query failed:<br>".mysql_error());
Comment