waynew Posted March 4, 2009 Share Posted March 4, 2009 I'm horribly hungover and have been staring at this query for the past 20 minutes yet I can't seem to see what's wrong: INSERT INTO crane_sales (make,model,capacity,width,height,length,weight,features,main_image,price,year_manu, superstructure,main_boom_length,flyjib_length,carrier_kms,condition) VALUES ('Test','Test','Test','TestTest','TestTest','Test','TestTest','Test','../uploaded_images/1236177772_cf42c62a21.jpeg','313','423', 'TestTest','342','3443','TestTest','TestTest') The error is: #1064 - 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) VALUES ('Test','Test','Test','TestTest','TestTest','Test','TestTest' at line 1 Link to comment https://forums.phpfreaks.com/topic/147925-solved-sql-error/ Share on other sites More sharing options...
revraz Posted March 4, 2009 Share Posted March 4, 2009 CONDITION is a MySQL reserved word, change the field name and it should work. Link to comment https://forums.phpfreaks.com/topic/147925-solved-sql-error/#findComment-776359 Share on other sites More sharing options...
waynew Posted March 4, 2009 Author Share Posted March 4, 2009 Thanks! Link to comment https://forums.phpfreaks.com/topic/147925-solved-sql-error/#findComment-776362 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.