开发者

why is mySQL missing a column?

This statement is not populating the image_path column. I have copied and pasted column names from phpMyAdmin to ensure accuracy.

INSERT INTO (theme_name, theme_path, image_path)
VALUES ('',
        '/Applications/MAMP/htdocs/waggleb/wp-content/plugins/app-switcher/themes/Original/',
  开发者_StackOverflow社区      '/Applications/MAMP/htdocs/waggleb/wp-content/plugins/app-switcher/thumbnails/original.png')


You're missing a table name. If you look at the MySQL INSERT syntax, you'll see that it's mandatory to include a table name.

As such, if you alter your query to become..

INSERT INTO <TABLE NAME> (theme_name, theme_path, image_path) VALUES...

...all should be well.


you missed the table name

INSERT INTO  TABLENAME(theme_name, theme_path, image_path)
VALUES ('',
        '/Applications/MAMP/htdocs/waggleb/wp-content/plugins/app-switcher/themes/Original/',
        '/Applications/MAMP/htdocs/waggleb/wp-content/plugins/app-switcher/thumbnails/original.png')


I believe you are missing the table name.

It should be:

Insert Into [Table_name] ([Columns]) Values ([Values])


You've forgotten to name a table to INSERT into:

INSERT INTO my_table (theme_name, theme_path, image_path)


If you omitted the table name on purpopse, check that the datatypes are correct for the columns. Check lengths of target columns are long enough to hold what you are inserting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜