You are using backticks[ used for columns] for variables. Make use of single quotes. Try the below code $ sql= " INSERT INTO registration ( enrollno, fname, lname, fathername, coursename, yearsem, facultyno, hostel, roomno,. Perhaps the table bi_ instituicoes has no such field id - check its structure. Or if your Mysql by 5 version change query to: Dump data for table. My guess is that the column id is not lower- case. This kind of confusion. You are using backticks ( \ ` ` ) for your values rather than regular quotes ( ' ` ). The backticks are used around table names and column names. Single quotes are used for strings like the strings " John" and " Smith" in your value. have placed other quotes ( backticks) in the query executed. If I change the quotes like.
INSERT INTO ` ps_ product_ check` ( ` id_ product`, ` name`, ` catalog` ) VALUES ( 30767, ` CT`, ' ' ). I get the same error. As you can see in the error message, the column " l" is unknown. It' s because of your loop. I don' t think you really have a column name " l" but a column name " liaogx". If so, you have to change your loop to this : for i in [ " liaogx" ] :. Try using different quotes for " y" as the identifier quote character is the backtick ( “ ` ” ). Otherwise MySQL " thinks" that you point to a column named " y". See also MySQL 5 Documentation. You must surround any strings with quotes. INSERT INTO ` example` ( ` id`, ` name`, ` password` ) VALUES ( 1, ' User Name', ' Password123' ).
The error was caused by a trigger which was doing a comparison on ' originalFieldName'. I had forgotten to specify it as new. originalFieldName to refer to the newly inserted value in that field and thus MySQL reported it as.