slinkums Posted February 18, 2009 Report Posted February 18, 2009 Jau pustundu blenžu kodā un nevaru ieraudzīt kļūdu, kāds, lūdzu, varētu palīdzēt ? $sql="INSERT INTO order (Firma, Vards, Tel, Epasts, Kom, Datums) VALUES ('$Firma','$Vards','$Tel','$Epasts','$Kom',CURDATE())"; kļūdas paziņojums Error: 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 'order (Firma, Vards, Tel, Epasts, Kom, Datums) VALUES ('a','v','b','c','a',CURD' at line 2 Quote
Aleksejs Posted February 18, 2009 Report Posted February 18, 2009 Tabula nedrīkst saukties order. ORDER BY - ir rezervētais SQL vārds. Varbūt ar kādu vūdū paņēmienu var arī nosaukt par order... Piemēram INSERT INTO `order` Quote
Aikss Posted February 18, 2009 Report Posted February 18, 2009 Tabulas vārds ir 'order', kas ir rezervētais vārds. 1) Visvienkāršāk būtu likt citu tabulas vārdu, piemēram, 'firms' vai 'firmas'. 2) Certain words such as SELECT, DELETE, or BIGINT are reserved and require special treatment for use as identifiers such as table and column names. This may also be true for the names of built-in functions. Kā ierasti par ilgu rakstu ... Quote
Gints Plivna Posted February 18, 2009 Report Posted February 18, 2009 Varbūt ar kādu vūdū paņēmienu var arī nosaukt par order... Piemēram INSERT INTO `order` Velk uz Par objektu (ne)nosaukumiem :) Quote
slinkums Posted February 18, 2009 Author Report Posted February 18, 2009 Oj, liels paldies, tā jau arī likās, ka iemesls kļūdai būs tāds - muļķīgs :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.