SQL Trouble

Discussion in 'MySQL' started by Moreno4, Sep 12, 2007.

  1. #1
    I just exported the table for user profile comments because I left an html comment that I couldn't delete through the site. Now that I've deleted that comment from the table, when I try to import I get the following error.

    Error
    SQL query: 
    
    -- 
    -- Dumping data for table `users_profile_comments`
    -- 
    INSERT INTO `users_profile_comments` ( `users_profile_comment_id` , `profile_user_id` , `comment` , `comment_user_id` , `date_added` ) 
    VALUES ( 1, 2, 'whattup shoot3r? AVENUUUEEE!!!', 1, '2007-07-08 11:12:05' ) , ( 2, 5, 'G-G-G-G-UNOT!! haha wattup kid? AVENUUUUEEE!', 1, '2007-08-10 14:34:23' ) , ( 3, 6, 'Welcome to My Media Playlist :)', 1, '2007-08-20 23:20:06' ) , ( 4, 11, 'Welcome to My Media Playlist!', 1, '2007-08-21 13:41:10' ) , ( 5, 11, 'wazzup wazzup........', 2, '2007-08-21 19:19:03' ) , ( 6, 12, 'Welcome to MMP kid, profile is lookin cold.', 1, '2007-08-21 21:56:19' ) , ( 7, 14, 'Welcome to the site SW DADDY!', 1, '2007-08-22 18:12:18' ) , ( 8, 15, 'Welcome to the site. Get at me if you need any help!', 1, '2007-08-22 23:30:34' ) , ( 9, 16, 'Welcome to the site Beautii', 1, '2007-08-24 01:34:58' ) , ( 10, 17, 'Welcome to the site Chi!', 1, '2007-08-24 03:03:12' ) , ( 11, 20, 'Welcome Coolboy', 1, '2007-08-24 16:07:52' ) , ( 12, 22, 'Welcome to MMP Bigpete!! Glad you came through', 1, '2007-08-25 00:33:44' ) , ( 13, 23, 'Wattup Shizz? Welcome to the site.', 1, '2007-08-26 15:31:17' ) , ( 14, 11, 'whatsup gurl r u on ota or what ??', 5, '2007-08-26 22:36:48' ) , ( 15, 1, 'u already no what it is homei OTA till da death do us part hahahaahah', 5, '2007-08-27 10:09:54' ) , ( 16, 30, 'Welcome to the site', 1, '2007-09-07 23:55:50' ) , ( 17, 19, 'oh snap... kraka done snapped with his profile. Well wait till I update this a lil more.. the profiles will be more easy to customize.', 1, '2007-09-08 10:02:57' ) , ( 19, 34, 'lol... welcome to the site Carolyn!', 1, '2007-09-12 12:21:30' ) , ( 20, 1, '=] thanks friend. i love this songggg..woo i think u can do big things. be the next bill gates', 34, '2007-09-12 13:07:44' ) , ( 21, 34, 'lol nah.. I''m handsome, bill gates isn''t :P.. well yeah you already know your boy has skills with this though hehe', 1, '2007-09-12 13:23:08' ) , ( 22, 1, 'naw i don''t know anything about those skills actually. but i''m sure you''ve got them', 34, '2007-09-12 13:44:47' ) , 
    
    MySQL said:  
    
    #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 '' at line 22 
    Code (markup):
    And here is the full table:
    -- phpMyAdmin SQL Dump
    -- version 2.10.3
    -- http://www.phpmyadmin.net
    -- 
    -- Host: mysql.*********.com
    -- Generation Time: Sep 12, 2007 at 02:12 PM
    -- Server version: 5.0.24
    -- PHP Version: 4.4.7
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    -- 
    -- Database: `rayz`
    -- 
    
    -- --------------------------------------------------------
    
    -- 
    -- Table structure for table `users_profile_comments`
    -- 
    
    CREATE TABLE IF NOT EXISTS `users_profile_comments` (
      `users_profile_comment_id` bigint(20) NOT NULL auto_increment,
      `profile_user_id` bigint(20) default NULL,
      `comment` text collate latin1_general_ci,
      `comment_user_id` bigint(20) default NULL,
      `date_added` datetime default NULL,
      PRIMARY KEY  (`users_profile_comment_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
    
    -- 
    -- Dumping data for table `users_profile_comments`
    -- 
    
    INSERT INTO `users_profile_comments` (`users_profile_comment_id`, `profile_user_id`, `comment`, `comment_user_id`, `date_added`) VALUES 
    (1, 2, 'whattup shoot3r? AVENUUUEEE!!!', 1, '2007-07-08 11:12:05'),
    (2, 5, 'G-G-G-G-UNOT!! haha wattup kid? AVENUUUUEEE!', 1, '2007-08-10 14:34:23'),
    (3, 6, 'Welcome to My Media Playlist :)', 1, '2007-08-20 23:20:06'),
    (4, 11, 'Welcome to My Media Playlist!', 1, '2007-08-21 13:41:10'),
    (5, 11, 'wazzup wazzup........', 2, '2007-08-21 19:19:03'),
    (6, 12, 'Welcome to MMP kid, profile is lookin cold.', 1, '2007-08-21 21:56:19'),
    (7, 14, 'Welcome to the site SW DADDY!', 1, '2007-08-22 18:12:18'),
    (8, 15, 'Welcome to the site. Get at me if you need any help!', 1, '2007-08-22 23:30:34'),
    (9, 16, 'Welcome to the site Beautii', 1, '2007-08-24 01:34:58'),
    (10, 17, 'Welcome to the site Chi!', 1, '2007-08-24 03:03:12'),
    (11, 20, 'Welcome Coolboy', 1, '2007-08-24 16:07:52'),
    (12, 22, 'Welcome to MMP Bigpete!! Glad you came through', 1, '2007-08-25 00:33:44'),
    (13, 23, 'Wattup Shizz? Welcome to the site.', 1, '2007-08-26 15:31:17'),
    (14, 11, 'whatsup gurl r u on ota or what ??', 5, '2007-08-26 22:36:48'),
    (15, 1, 'u already no what it is homei OTA till da death do us part hahahaahah', 5, '2007-08-27 10:09:54'),
    (16, 30, 'Welcome to the site', 1, '2007-09-07 23:55:50'),
    (17, 19, 'oh snap... kraka done snapped with his profile. Well wait till I update this a lil more.. the profiles will be more easy to customize.', 1, '2007-09-08 10:02:57'),
    (19, 34, 'lol... welcome to the site Carolyn!', 1, '2007-09-12 12:21:30'),
    (20, 1, '=] thanks friend. i love this songggg..woo i think u can do big things. be the next bill gates', 34, '2007-09-12 13:07:44'),
    (21, 34, 'lol nah.. I''m handsome, bill gates isn''t :P.. well yeah you already know your boy has skills with this though hehe', 1, '2007-09-12 13:23:08'),
    (22, 1, 'naw i don''t know anything about those skills actually. but i''m sure you''ve got them', 34, '2007-09-12 13:44:47'),
    Code (markup):
    Can someone tell me why it's not going through?
     
    Moreno4, Sep 12, 2007 IP
  2. RaginBajin

    RaginBajin Peon

    Messages:
    87
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2



    it's because some of your data has double '' in them. For example you have an entry in record id 22 that says 'nah I don''t..

    Switch the ' to " for those lines and load the data back in. If you only had one record to remove, why did you dump the data instead of just use the delete command?
     
    RaginBajin, Sep 12, 2007 IP
  3. Moreno4

    Moreno4 Banned

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    well I'm new to mysql.. well actually messing around with it. But I did what you said and still getting errors.

    Error
    There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
    
    ERROR: Unknown Punctuation String @ 4099
    STR: ??
    SQL: -- phpMyAdmin SQL Dump
    -- version 2.10.3
    -- http://www.phpmyadmin.net
    -- 
    -- Host: mysql.********.com
    -- Generation Time: Sep 12, 2007 at 02:12 PM
    -- Server version: 5.0.24
    -- PHP Version: 4.4.7
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";# MySQL returned an empty result set (i.e. zero rows).
    
    
    -- 
    -- Database: `rayz`
    -- 
    
    -- --------------------------------------------------------
    
    -- 
    -- Table structure for table `users_profile_comments`
    -- 
    
    CREATE TABLE IF NOT EXISTS `users_profile_comments` (
      `users_profile_comment_id` bigint(20) NOT NULL auto_increment,
      `profile_user_id` bigint(20) default NULL,
      `comment` text collate latin1_general_ci,
      `comment_user_id` bigint(20) default NULL,
      `date_added` datetime default NULL,
      PRIMARY KEY  (`users_profile_comment_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;# MySQL returned an empty result set (i.e. zero rows).
    
    
    -- 
    -- Dumping data for table `users_profile_comments`
    -- 
    
    INSERT INTO `users_profile_comments` (`users_profile_comment_id`, `profile_user_id`, `comment`, `comment_user_id`, `date_added`) VALUES 
    (1, 2, 'whattup shoot3r? AVENUUUEEE!!!', 1, '2007-07-08 11:12:05'),
    (2, 5, 'G-G-G-G-UNOT!! haha wattup kid? AVENUUUUEEE!', 1, '2007-08-10 14:34:23'),
    (3, 6, 'Welcome to My Media Playlist :)', 1, '2007-08-20 23:20:06'),
    (4, 11, 'Welcome to My Media Playlist!', 1, '2007-08-21 13:41:10'),
    (5, 11, 'wazzup wazzup........', 2, '2007-08-21 19:19:03'),
    (6, 12, 'Welcome to MMP kid, profile is lookin cold.', 1, '2007-08-21 21:56:19'),
    (7, 14, 'Welcome to the site SW DADDY!', 1, '2007-08-22 18:12:18'),
    (8, 15, 'Welcome to the site. Get at me if you need any help!', 1, '2007-08-22 23:30:34'),
    (9, 16, 'Welcome to the site Beautii', 1, '2007-08-24 01:34:58'),
    (10, 17, 'Welcome to the site Chi!', 1, '2007-08-24 03:03:12'),
    (11, 20, 'Welcome Coolboy', 1, '2007-08-24 16:07:52'),
    (12, 22, 'Welcome to MMP Bigpete!! Glad you came through', 1, '2007-08-25 00:33:44'),
    (13, 23, 'Wattup Shizz? Welcome to the site.', 1, '2007-08-26 15:31:17'),
    (14, 11, 'whatsup gurl r u on ota or what ??', 5, '2007-08-26 22:36:48'),
    (15, 1, 'u already no what it is homei OTA till da death do us part hahahaahah', 5, '2007-08-27 10:09:54'),
    (16, 30, 'Welcome to the site', 1, '2007-09-07 23:55:50'),
    (17, 19, 'oh snap... kraka done snapped with his profile. Well wait till I update this a lil more.. the profiles will be more easy to customize.', 1, '2007-09-08 10:02:57'),
    (19, 34, 'lol... welcome to the site Carolyn!', 1, '2007-09-12 12:21:30'),
    (20, 1, '=] thanks friend. i love this songggg..woo i think u can do big things. be the next bill gates', 34, '2007-09-12 13:07:44'),
    (21, 34, 'lol nah.. I'm handsome, bill gates isn't :P.. well yeah you already know your boy has skills with this though hehe', 1, '2007-09-12 13:23:08'),
    (22, 1, 'nah i don't know anything about those skills actually. but i'm sure you've got them', 34, '2007-09-12 13:44:47'),
    
    -- 
    -- Dumping data for table `users_profile_comments`
    -- 
    
    INSERT INTO `users_profile_comments` (`users_profile_comment_id`, `profile_user_id`, `comment`, `comment_user_id`, `date_added`) VALUES 
    (1, 2, 'whattup shoot3r? AVENUUUEEE!!!', 1, '2007-07-08 11:12:05'),
    (2, 5, 'G-G-G-G-UNOT!! haha wattup kid? AVENUUUUEEE!', 1, '2007-08-10 14:34:23'),
    (3, 6, 'Welcome to My Media Playlist :)', 1, '2007-08-20 23:20:06'),
    (4, 11, 'Welcome to My Media Playlist!', 1, '2007-08-21 13:41:10'),
    (5, 11, 'wazzup wazzup........', 2, '2007-08-21 19:19:03'),
    (6, 12, 'Welcome to MMP kid, profile is lookin cold.', 1, '2007-08-21 21:56:19'),
    (7, 14, 'Welcome to the site SW DADDY!', 1, '2007-08-22 18:12:18'),
    (8, 15, 'Welcome to the site. Get at me if you need any help!', 1, '2007-08-22 23:30:34'),
    (9, 16, 'Welcome to the site Beautii', 1, '2007-08-24 01:34:58'),
    (10, 17, 'Welcome to the site Chi!', 1, '2007-08-24 03:03:12'),
    (11, 20, 'Welcome Coolboy', 1, '2007-08-24 16:07:52'),
    (12, 22, 'Welcome to MMP Bigpete!! Glad you came through', 1, '2007-08-25 00:33:44'),
    (13, 23, 'Wattup Shizz? Welcome to the site.', 1, '2007-08-26 15:31:17'),
    (14, 11, 'whatsup gurl r u on ota or what ??', 5, '2007-08-26 22:36:48'),
    (15, 1, 'u already no what it is homei OTA till da death do us part hahahaahah', 5, '2007-08-27 10:09:54'),
    (16, 30, 'Welcome to the site', 1, '2007-09-07 23:55:50'),
    (17, 19, 'oh snap... kraka done snapped with his profile. Well wait till I update this a lil more.. the profiles will be more easy to customize.', 1, '2007-09-08 10:02:57'),
    (19, 34, 'lol... welcome to the site Carolyn!', 1, '2007-09-12 12:21:30'),
    (20, 1, '=] thanks friend. i love this songggg..woo i think u can do big things. be the next bill gates', 34, '2007-09-12 13:07:44'),
    (21, 34, 'lol nah.. I'm handsome, bill gates isn't :P.. well yeah you already know your boy has skills with this though hehe', 1, '2007-09-12 13:23:08'),
    (22, 1, 'nah i don't know anything about those skills actually. but i'm sure you've got them', 34, '2007-09-12 13:44:47'),
    
    
    SQL query: 
    
    -- -- Dumping data for table `users_profile_comments` -- INSERT INTO `users_profile_comments` (`users_profile_comment_id`, `profile_user_id`, `comment`, `comment_user_id`, `date_added`) VALUES (1, 2, 'whattup shoot3r? AVENUUUEEE!!!', 1, '2007-07-08 11:12:05'), (2, 5, 'G-G-G-G-UNOT!! haha wattup kid? AVENUUUUEEE!', 1, '2007-08-10 14:34:23'), (3, 6, 'Welcome to My Media Playlist :)', 1, '2007-08-20 23:20:06'), (4, 11, 'Welcome to My Media Playlist!', 1, '2007-08-21 13:41:10'), (5, 11, 'wazzup wazzup........', 2, '2007-08-21 19:19:03'), (6, 12, 'Welcome to MMP kid, profile is lookin cold.', 1, '2007-08-21 21:56:19'), (7, 14, 'Welcome to the site SW DADDY!', 1, '2007-08-22 18:12:18'), (8, 15, 'Welcome to the site. Get at me if you need any help!', 1, '2007-08-22 23:30:34'), (9, 16, 'Welcome to the site Beautii', 1, '2007-08-24 01:34:58'), (10, 17, 'Welcome to the site Chi!', 1, '2007-08-24 03:03:12'), (11, 20, 'Welcome Coolboy', 1, '2007-08-24 16:07:52'), (12, 22, 'Welcome to MMP Bigpete!! Glad you came through', 1, '2007-08-25 00:33:44'), (13, 23, 'Wattup Shizz? Welcome to the site.', 1, '2007-08-26 15:31:17'), (14, 11, 'whatsup gurl r u on ota or what ??', 5, '2007-08-26 22:36:48'), (15, 1, 'u already no what it is homei OTA till da death do us part hahahaahah', 5, '2007-08-27 10:09:54'), (16, 30, 'Welcome to the site', 1, '2007-09-07 23:55:50'), (17, 19, 'oh snap... kraka done snapped with his profile. Well wait till I update this a lil more.. the profiles will be more easy to customize.', 1, '2007-09-08 10:02:57'), (19, 34, 'lol... welcome to the site Carolyn!', 1, '2007-09-12 12:21:30'), (20, 1, '=] thanks friend. i love this songggg..woo i think u can do big things. be the next bill gates', 34, '2007-09-12 13:07:44'), (21, 34, 'lol nah.. I'm handsome, bill gates isn't :P.. well yeah you already know your boy has skills with this though hehe', 1, '2007-09-12 13:23:08'), (22, 1, 'nah i don't know anything about those skills actually. but i'm sure you've got them', 34, '2007-09-12 13:44:47'), 
    
    MySQL said:  
    
    #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 'm handsome, bill gates isn't :P.. well yeah you already know your boy has skills' at line 21 
    
    Code (markup):
    what now?
     
    Moreno4, Sep 12, 2007 IP
  4. Moreno4

    Moreno4 Banned

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    where you at ragin? I need help asap
     
    Moreno4, Sep 13, 2007 IP