PDA

View Full Version : MySQL said: #1054


me2
02-10-2008, 08:18 AM
#1054 - Unknown column ''14'' in 'field list'

INSERT INTO `forum_posts`(`owner`,`post`,`created`,`modified`,`thread_id`) VALUES(`'14'`,`'hello '`,`'1202627709'`,`'1202627709'`,`'1'`)

I put this into a mysql query in phpmyadmin and got an error.. How would i fix this error??

Andrew Johnson
02-10-2008, 08:45 AM
Why are you double quoting all the values?

Try:

INSERT INTO `forum_posts`(`owner`,`post`,`created`,`modified`,`thread_id`) VALUES('14','hello ','1202627709','1202627709','1')

StupidRalph
02-10-2008, 09:24 AM
Actually, those appear to be backticks surrounding the single quotes.

Me2 - you should use backticks to indicate a database name, table, or column. You should pass in your VALUES as strings indicated by quotation marks as Andrew Johnson has demonstrated.

me2
02-11-2008, 03:51 AM
oh k.. Didn't know that.. Initially i used just backticks then i added in the single quotes to see if it would work like that and forgot to take them out for this post.
Thanks for your help seems to work now..