Monday 27 November 2017

php - SQL Query not working - No reason?

I have a problem. I created a SQL Query, to insert
something into the
database:



INSERT INTO order
(kundennummer,empfaenger,adresse,plz,ort,land,email,time,approvalPending)

VALUES ('232784', 'Niklas Peters', 'Some Stret', 'PostalCode', 'Wien', 'AT',
'email@email.com', '1454593142',
'1')


But I always get
the 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

(kundennummer,empfaenger,adresse,plz,ort,land,email,time,approvalPending)
'
at line 1




My Code
is PHP



$sql = "INSERT INTO order
(kundennummer,empfaenger,adresse,plz,ort,land,email,time,approvalPending) VALUES
('".$kdnr."', '".$emp."', '".$adresse."', '".$plz."', '".$ort."', '".$land."',
'".$email."', '".$time."',
'1')";



I
just dont know what is wrong - Am I
blind?



Cheers - would be glad for
help!

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...