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
https://forums.phpfreaks.com/topic/187133-unknown-column-in-field-list/
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.

 

 

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.