Search code examples
phpmysqlmysqlimysql-error-1064

Error in Mysql Query #1064 - You have an error in your SQL syntax;


Executing the query below throws this error #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 '' at line 1:

INSERT INTO farmpreparation (idno, loanno, plotno, initialcost, primarycost,` `secondarycost, tertiarycost, manuallabour, machinelabour, othercost,` `totalcost, typeofcost, addedby, timestamp) VALUES ('234354554',` `'34206bfce6ac247af85d77b840e9d8cf', 'SDDF454677', '2000', '0', '2000', '2000',` `'2000', '0', '0', '8000', 'ESTIMATE', 'admin', '2015-11-03 01:50:49'

Solution

  • try this you have ')' missing

    INSERT INTO farmpreparation (idno, loanno, plotno, initialcost, primarycost, secondarycost, tertiarycost, manuallabour, machinelabour, othercost, totalcost, typeofcost, addedby, timestamp) VALUES ('234354554', '34206bfce6ac247af85d77b840e9d8cf', 'SDDF454677', '2000', '0', '2000', '2000', '2000', '0', '0', '8000', 'ESTIMATE', 'admin', '2015-11-03 01:50:49')