Jump to content

error while trying to update mysql table


Recommended Posts

i am trying to use a update mysql command, i have a database named "r_id" with tables in the database name r40 , r30, r45 ect. i have 3 columns in each table id , content, box when i try to update i am getting this error any idea why? $con = mysql_connect($host,$user,$passwd);if (!$con) { die('Could not connect: ' . mysql_error()); }mysql_select_db("r_id", $con); $result = mysql_query("UPDATE '$r_id' SET box = '$box' WHERE content = '$content'"); die('Error: ' . mysql_error()); 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 ''r30' SET box = '10' WHERE content = 'DG'' at line 1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...