New to PHP and MySQL....
I have a form to update data in a specific row. Data types for each of the columns are mostly VarChars but I also have a text field.
When I run an update query such as:
$sql = "UPDATE EMPLOYMENT SET ref='$ref',date='$date',title='$title',desc='$desc' WHERE id='$job_id'";
It fails at the 'desc' field which is the only test field.
If I run the query without the Desc field in it - no problems...
The MySQL error is:
You have an error in your SQL syntax near 'desc='new description' WHERE id='3'' at line 1
This has me completely stumped....
I have a form to update data in a specific row. Data types for each of the columns are mostly VarChars but I also have a text field.
When I run an update query such as:
$sql = "UPDATE EMPLOYMENT SET ref='$ref',date='$date',title='$title',desc='$desc' WHERE id='$job_id'";
It fails at the 'desc' field which is the only test field.
If I run the query without the Desc field in it - no problems...
The MySQL error is:
You have an error in your SQL syntax near 'desc='new description' WHERE id='3'' at line 1
This has me completely stumped....