$query = "INSERT INTO textbooks (uid, title, edition, author, isbn, condition, description, photo) VALUES (9, 'q', 'a', 'b', 'c', 'd', 'e', '$extension')";
$result = mysql_query($query) or die('Could not connect: ' . mysql_error());
Could not connect: 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 'condition, description, photo) VALUES (9, 'q', 'a', 'b', 'c', 'd', 'e', '.jpg')' at line 1
I've been receiving a MySQL syntax error but I can't for the life of me figure out what's wrong. I placed in random variables, strings, and int just to test but it's not working.
- title, edition, author, isbn, condition, description, photo are all varchars
- uid is an int
- description is text
condition is reserved word in mysql. Use `condition`
condition is a MySQL reserved word.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With