2012-07-08 95 views
0

我试图做一个批量插入到数据库中,试图让我的生活更容易一点 - 但是,试图插入时,我不断收到一个问题。我想我的问题是,它包含一个*(但我不知道)。有什么建议么?很抱歉的新手问题。SQL INSERT(BASIC)

错误:

1064 - 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 's Wall, liking, commenting on or sharing one of your Page posts, answering a Que' at line 3

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') 

回答

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, ...' 
+0

辉煌,谢谢! – 2012-07-08 18:55:54

1

问题是,你的值有一个单引号'在他们,这是不会逃脱。 尝试用另一句名言你的价值中逸出单引号。 例如:Page'sPage''s