Jump to content
php.lv forumi

Mysql query sintakses errors


slinkums

Recommended Posts

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

Link to comment
Share on other sites

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 ...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...