我正在尝试将批量插入到数据库中,尝试让我的生活更轻松一些 - 但是,我在尝试插入时一直遇到问题。我认为我的问题是它包含*(但我不确定)。有什么建议?抱歉新手问题。
错误:
1064 - 您的SQL语法出错;检查与MySQL服务器版本对应的手册,以获得正确的语法 靠近墙壁,喜欢,评论或分享您的一个页面帖子, 在第3行回答Que'
INSERT INTO `bushell_stats`.`stats` (`id`, `name`, `description`) VALUES
(NULL, 'page_stories', 'The number of stories created about your Page'),
(NULL, 'page_storytellers*', 'The number of people sharing stories about your page. These stories include liking your Page, posting to your Page's Wall, liking, commenting on or sharing one of your Page posts, answering a Question you posted, RSVPing to one of your events, mentioning your Page, phototagging your Page or checking in at your Place Note that currently only the weekly value is in real-time if you set until=now in the request'),
(NULL, 'page_stories_by_story_type', 'The number of stories about your Page by story type'),
(NULL, 'page_storytellers_by_story_type', 'The number of people talking about your Page, by story type'),
(NULL, 'page_storytellers_by_age_gender', 'The number of People Talking About the Page by user age and gender'),
(NULL, 'page_storytellers_by_country', 'The number of People Talking About the Page by user country'),
(NULL, 'page_storytellers_by_locale', 'The number of People Talking About the Page by user language'),
(NULL, 'page_impressions', 'The total number of impressions seen of any content associated with your Page'),
(NULL, 'page_impressions_unique', 'The number of people who have seen any content associated with your Page'),
(NULL, 'page_impressions_paid', 'The number of impressions of a Sponsored Story or Ad pointing to your Page'),
(NULL, 'page_impressions_paid_unique', 'Number of people who saw a sponsored story or Ad about your Page'),
(NULL, 'page_impressions_organic', 'The number of times your posts were seen in News Feed or Ticker or on visits to your Page. These impressions can be Fans or non-Fans'),
(NULL, 'page_impressions_organic_unique', 'The number of people who visited your Page, or saw your Page or one of its posts in News Feed or Ticker. These impressions can be Fans or non-Fans'),
(NULL, 'page_impressions_viral', 'The number of impressions of a story published by a friend about your Page. These stories include liking your Page, posting to your Page's Wall, liking, commenting on or sharing one of your Page posts, answering a Question you posted, RSVPing to one of your events, mentioning your Page, phototagging your Page or checking in at your Place'),
(NULL, 'page_impressions_viral_unique', 'The number of people who saw your Page or one of its posts from a story published by a friend. These stories include liking your Page, posting to your Page's Wall, liking, commenting on or sharing one of your Page posts, answering a Question you posted, RSVPing to one of your events, mentioning your Page, phototagging your Page or checking in at your Place'),
(NULL, 'page_impressions_by_story_type', 'Total impressions of stories published by a friend about your Page by story type'),
(NULL, 'page_impressions_by_story_type_unique', 'The number of people who saw a story about your Page by story type'),
(NULL, 'page_impressions_by_city_unique', 'The number of people who have seen any content associated with your Page by city'),
(NULL, 'page_impressions_by_age_gender_unique', 'The number of people who have seen any content associated with your Page by age and gender grouping'),
(NULL, 'page_impressions_frequency_distribution', 'The number of people your Page reached broken down by how many times people saw any content about your Page'),
(NULL, 'page_impressions_viral_frequency_distribution', 'The number of people your Page reached from a story published by a friend, broken down by how many times people saw stories about your Page'),
(NULL, 'page_engaged_users', 'The number of people who engaged with your Page. Engagement includes any click'),
(NULL, 'page_consumptions', 'The number of times people clicked on any of your content without generating a story'),
(NULL, 'page_consumptions_unique', 'The number of people who clicked on any of your content without generating a story'),
(NULL, 'page_consumptions_by_consumption_type', 'The number of times people clicked on any of your content without generating a story, by type'),
(NULL, 'page_consumptions_by_consumption_type_unique', 'The number of people who clicked on any of your content without generating a story, by type'),
(NULL, 'page_places_checkin_total', 'The number of times people checked into a place'),
(NULL, 'page_places_checkin_total_unique', 'The number of people who checked into a place'),
(NULL, 'page_places_checkin_mobile', 'The number of times people checked into a place using mobile phones'),
(NULL, 'page_places_checkin_mobile_unique', 'The number of people who checked into a place using mobile phones'),
(NULL, 'page_places_checkins_by_age_gender', 'gender and age of people who checked in at your Place'),
(NULL, 'page_places_checkins_by_locale', 'top locales of people who checked into your Place'),
(NULL, 'page_places_checkins_by_country', 'top countries of people who checked into your Place'),
(NULL, 'page_negative_feedback', 'The number of times people took a negative action (e.g., un-liked or hid a post)'),
(NULL, 'page_negative_feedback_unique', 'The number of people who took a negative action (e.g., un-liked or hid a post)'),
(NULL, 'page_negative_feedback_by_type', 'The number of times people took a negative action broken down by type (see negative feedback types)'),
(NULL, 'page_negative_feedback_by_type_unique', 'The number of people who took a negative action broken down by type see negative feedback types)'),
(NULL, 'page_fans', 'The total number of people who have liked your Page.'),
(NULL, 'page_fans_locale', 'Aggregated language data about the people who like your Page based on the default language setting selected when accessing Facebook.'),
(NULL, 'page_fans_city', 'Aggregated Facebook location data, sorted by city, about the people who like your Page.'),
(NULL, 'page_fans_country', 'Aggregated Facebook location data, sorted by country, about the people who like your Page'),
(NULL, 'page_fans_gender_age', 'Aggregated demographic data about the people who like your Page based on the age and gender information they provide in their user profiles.'),
(NULL, 'page_fan_adds', 'The number of new people who have liked your Page.'),
(NULL, 'page_fan_adds_unique', 'The number of new people who have liked your Page.'),
(NULL, 'page_fans_by_like_source', 'This is a breakdown of the number of Page likes from the most common places where people can like your Page (see like sources).'),
(NULL, 'page_fans_by_like_source_unique', 'The number of people who liked your Page, broken down by the most common places where people can like your Page (see like sources).'),
(NULL, 'page_fan_removes', 'Unlikes of your Page'),
(NULL, 'page_fan_removes_unique', 'Unlikes of your Page'),
(NULL, 'page_friends_of_fans', 'The number of people who are friends of the Fans of your Page (estimated)'),
(NULL, 'page_tab_views_login_top_unique', 'The number of users logged into Facebook who saw tabs on your Page'),
(NULL, 'page_tab_views_login_top', 'The number of times users logged into Facebook saw tabs on your Page'),
(NULL, 'page_views', 'Page views'),
(NULL, 'page_views_unique', 'Page Views from users logged into Facebook'),
(NULL, 'page_views_login', 'Page Views from users logged into Facebook'),
(NULL, 'page_views_login_unique', 'Page Views from users logged into Facebook'),
(NULL, 'page_views_logout', 'Page views from users not logged into Facebook'),
(NULL, 'page_views_external_referrals', 'Top referrering external domains sending traffic to your Page.'),
(NULL, 'page_posts_impressions', 'The number of impressions that came from all of your posts'),
(NULL, 'page_posts_impressions_unique', 'The number of people who saw any of your Page posts'),
(NULL, 'page_posts_impressions_paid', 'The number of impressions of your Page posts in an Ad or Sponsored Story'),
(NULL, 'page_posts_impressions_paid_unique', 'The number of people who saw your Page posts in an Ad or Sponsored Story'),
(NULL, 'page_posts_impressions_organic', 'The number of impressions of your posts in News Feed or Ticker or on your Page'),
(NULL, 'page_posts_impressions_organic_unique', 'The number of people who saw your Page posts in News Feed or Ticker, or on your Page's Wall'),
(NULL, 'page_posts_impressions_viral', 'The number of times users saw your posts via stories published by their friends'),
(NULL, 'page_posts_impressions_viral_unique', 'The number of people who saw your Page posts via a story from a friend'),
(NULL, 'page_posts_impressions_frequency_distribution', 'The number of people who saw your Page posts, broken down by how many times people saw your posts'),
(NULL, 'post_stories*', 'The number of stories generated about your Page post'),
(NULL, 'post_storytellers*', 'The number of unique people who created a story about your Page post'),
(NULL, 'post_stories_by_action_type*', 'The number of stories created about your Page post, by action type'),
(NULL, 'post_storytellers_by_action_type*', 'The number of unique people who created a story about your Page post, by action type'),
(NULL, 'post_impressions*', 'The number of times your Page post was seen'),
(NULL, 'post_impressions_unique*', 'The number of people who saw your Page post'),
(NULL, 'post_impressions_paid*', 'The number of impressions of your Page post in an Ad or Sponsored Story'),
(NULL, 'post_impressions_paid_unique*', 'The number of people who saw your Page post in an Ad or Sponsored Story'),
(NULL, 'post_impressions_organic*', 'The number of impressions of your post in Newsfeed, Ticker, or on your Page's Wall'),
(NULL, 'post_impressions_organic_unique*', 'The number of people who saw your post in their Newsfeed or Ticker or on your Page's Wall'),
(NULL, 'post_impressions_viral*', 'The number of impressions of your Page post in a story generated by a friend'),
(NULL, 'post_impressions_viral_unique*', 'The number of people who saw your page post in a story from a friend'),
(NULL, 'post_impressions_by_story_type*', 'The number of times this post was seen via a story published by a friend of the person viewing the post'),
(NULL, 'post_impressions_by_story_type_unique*', 'The number of people who saw your page post in a story from a friend, by story type'),
(NULL, 'post_consumptions*', 'The number of times people clicked on anywhere in your posts without generating a story'),
(NULL, 'post_consumptions_unique*', 'The number of people who clicked anywhere in your post without generating a story'),
(NULL, 'post_consumptions_by_type*', 'The number of times people clicked on anywhere in your posts without generating a story, by consumption type'),
(NULL, 'post_consumptions_by_type_unique*', 'The number of people who clicked anywhere in your post without generating a story, by consumption type'),
(NULL, 'post_engaged_users*', 'The number of people who clicked anywhere in your posts'),
(NULL, 'post_negative_feedback*', 'The number of times people took a negative action in your post (e.g. hid it)'),
(NULL, 'post_negative_feedback_unique*', 'The number of people who took a negative action in your post (e.g., hid it)'),
(NULL, 'post_negative_feedback_by_type*', 'The number of times people took a negative action in your post broken down by type'),
(NULL, 'post_negative_feedback_by_type_unique*', 'The number of people who took a negative action in your post broken down by type')
答案 0 :(得分:9)
问题是您的文字包含未转义的引号:
'...ing your Page, posting to your Page's Wall, ...'
-- ^ here
你可以使用另一个引用来逃避它们:
'...ing your Page, posting to your Page''s Wall, ...'
或反斜杠:
'...ing your Page, posting to your Page\'s Wall, ...'
答案 1 :(得分:1)
问题是你的值中有一个单引号,它没有被转义。
尝试使用另一个引号转义值中的单引号。
例如:Page's
到Page''s