Jump to content

Simple MySQL INSERT INTO driving me nuts!


kts

Recommended Posts

Hey guys,

 

It's been a while since I've php'd and MySQL'd but this should definitely be working... Not sure at all whats causing this problem.. Possibly a mysql table setting?

 

 

$sql = "INSERT INTO lct (id, show, img) VALUES (NULL, '209', 'ba-nlns-logo.jpg');"

 

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 'show, img) VALUES (NULL, '209', 'ba-nlns-logo.jpg')' at line 1

 

Table structure is just id INT(30) primary key, show INT(30), img TEXT

 

Even when I Insert via phpMyAdmin and then do create php code for it, paste it into SQL for phpMyAdmin

I get the same error! It's crazy?

 

Thanks.

Same issue occurs...

 

INSERT INTO lct (show, img) VALUES ('209', 'ba-nlns-logo.jpg');

 

 

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 'show, img) VALUES ('209', 'ba-nlns-logo.jpg')' at line 1

 

Could it be something set on the table? I mean I've NEVER had this much of an issue... it has to be something stupid.

 

I thought I had pasted both in sorry... Still:

 

INSERT INTO lct (show, img) VALUES (208, 'clt-nlns-logo.jpg');

 

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 'show, img) VALUES (208, 'clt-nlns-logo.jpg')' at line 1

 

It is making no sense to me what soever

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.