$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