apoch632 Posted September 25, 2008 Share Posted September 25, 2008 I jsut cannot see what is wrong with this code today. It keeps giving me a syntax error. Its probably something simple but I just cannot see what it is $yearfounded = $_POST['yearfounded']; $refurbished = $_POST['refurbished']; $year_refurbished = $_POST['year_refurbished']; $condition = $_POST['condition']; $condition_details = $_POST['condition_details']; $query = "INSERT INTO sectionfive (yearfounded, year_refurbished, condition, condition_details, refurbished ) VALUES('$yearfounded','$year_refurbished','$condition','$condition_details','$refurbished') " ; Link to comment https://forums.phpfreaks.com/topic/125771-solved-basic-enough-phpmysql-error/ Share on other sites More sharing options...
asmith Posted September 25, 2008 Share Posted September 25, 2008 What is the error ? Link to comment https://forums.phpfreaks.com/topic/125771-solved-basic-enough-phpmysql-error/#findComment-650352 Share on other sites More sharing options...
apoch632 Posted September 25, 2008 Author Share Posted September 25, 2008 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, condition_details, refurbished ) VALUES('2008','1991','In Need Of R' at line 1 Link to comment https://forums.phpfreaks.com/topic/125771-solved-basic-enough-phpmysql-error/#findComment-650359 Share on other sites More sharing options...
asmith Posted September 25, 2008 Share Posted September 25, 2008 you have a column in your table with the name : condition . I guess that is a reserve name which you can't use it. changing this name to another one, will solve your problem. like condition1 or any other name except condition. Link to comment https://forums.phpfreaks.com/topic/125771-solved-basic-enough-phpmysql-error/#findComment-650364 Share on other sites More sharing options...
apoch632 Posted September 25, 2008 Author Share Posted September 25, 2008 Cheers man for that Link to comment https://forums.phpfreaks.com/topic/125771-solved-basic-enough-phpmysql-error/#findComment-650375 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.