I simply cannot get my head around this one.
I am writing a simple PHP script to update a specific database field.
This query works fine, no problems at all, however setting_id is liable to change it seems and so is not suitable/portable
mysql_query("UPDATE oc_setting SET value='" . $css . "'" . 'WHERE setting_id=13576', $con) or die(mysql_error());
This query, does not seem to work under any circumstances, which is the query I need.
mysql_query("UPDATE oc_setting SET value='" . $css . "'" . 'WHERE key="sellya_custom_css"', $con) or die(mysql_error());
It leaves me this error: 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 'key="sellya_custom_css"' at line 1
Now I had a hunch it may have something with the word key perhaps being a reserved keyword or something so I tried wrapping it in quotes, and while the script did not come up with any errors, it did not update the field either.
I have tried countless of combinations with single quotes double quotes, concatenation combinations of various sorts to no avail.
Could someone please help me out here?
Thank you.