Jump to content

unknown column in field list


smdufb

Recommended Posts

Hi

 

i get a funny error... here goes

 

mysql_query("INSERT INTO categories (name) VALUES (kdjsbfksjd)");

 

will give me the error Unknown column 'kdjsbfksjd' in 'field list'

 

it is looking for COLUMN names in the VALUES bracket??

 

i've spent hours reading other peoples posts with this error, checking my code (and reducing it to this) aswell as checking my mysql table.

 

the table has

1 NOT NULL auto_increment PRIMARY column and

3 UTF8_unicode_ci text columns

 

their names are not reserved words.

i've dropped and created it several times. restarted the apache and mysql.. no luck.

 

am i just stupid or blind ...i would appreciate some help. thanks

Link to comment
Share on other sites

i've tried that also, i get a longer mysql error from that:

 

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 ''name') VALUES ('kdjsbfksjd')' at line 1

 

and if i use double-quotes php complains obviously because the whole thing is already in double-quotes.

 

 

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.