shane18 Posted January 16, 2010 Share Posted January 16, 2010 Before you all go yelling at me for not filtering the input data, only I will be using this program from a home server so i ain't worried about it. Why don't this work? $DATABASE->query("INSERT INTO movies (title,case,number) VALUES('{$_POST["title"]}','{$_POST["case"]}','{$_POST["number"]}')"); Link to comment https://forums.phpfreaks.com/topic/188644-insert-error/ Share on other sites More sharing options...
greatstar00 Posted January 16, 2010 Share Posted January 16, 2010 u need to put `` around case (the one at "title, case, number") ` << left of 1, top of tab key cause case is a mysql reserved word why wont it work? cause the computer is dumb enough, it dont know what u mean, a reserved word, or a mysql command Link to comment https://forums.phpfreaks.com/topic/188644-insert-error/#findComment-995904 Share on other sites More sharing options...
shane18 Posted January 16, 2010 Author Share Posted January 16, 2010 i didn't know this, thanks Link to comment https://forums.phpfreaks.com/topic/188644-insert-error/#findComment-995905 Share on other sites More sharing options...
greatstar00 Posted January 16, 2010 Share Posted January 16, 2010 to avoid further error like this always put ` ` around column names, or table names Link to comment https://forums.phpfreaks.com/topic/188644-insert-error/#findComment-995906 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.