Jump to content

error while trying to update mysql table


zephral

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...