I am trying to do just a back insert with some PHP but its throwing a syntax error that i cannot figure out.
at this point i have connected to my DB successfully.
The Order table already exists and orderID is a varchar(20). I don't know why its throwing this:Code:if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("SeniorP", $con); $sql = "INSERT INTO Order (orderID) VALUES ('abcc')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } mysql_close($con);
ThanksCode: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 'Order (orderID) VALUES ('abcc')' at line 1


Reply With Quote

Bookmarks