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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

  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.

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