Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2009
    Posts
    120
    Plugin Contributions
    0

    help question Why Does this SQL not work?

    Hi,

    I'm dropping my 'reviews' table and trying to upload a new version. However I keep getting the error message:

    #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 '2011-02-13 15:17:05', NULL, 19, 1),(80, 180, NULL, 'M', 5, '2011-02-13 15:18:05'' at line 71

    This is what I'm trying to insert:

    Code:
    -- phpMyAdmin SQL Dump
    -- version 2.11.11.3
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Jun 01, 2011 at 04:20 PM
    -- Server version: 4.1.22
    -- PHP Version: 5.2.9
    
    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    --
    -- Database: `xkwies_handcrafteduk`
    --
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `reviews`
    --
    
    CREATE TABLE IF NOT EXISTS `reviews` (
      `reviews_id` int(11) NOT NULL auto_increment,
      `products_id` int(11) NOT NULL default '0',
      `customers_id` int(11) default NULL,
      `customers_name` varchar(64) NOT NULL default '',
      `reviews_rating` int(1) default NULL,
      `date_added` datetime default NULL,
      `last_modified` datetime default NULL,
      `reviews_read` int(5) NOT NULL default '0',
      `status` int(1) NOT NULL default '1',
      PRIMARY KEY  (`reviews_id`),
      KEY `idx_products_id_zen` (`products_id`),
      KEY `idx_customers_id_zen` (`customers_id`),
      KEY `idx_status_zen` (`status`),
      KEY `idx_date_added_zen` (`date_added`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=77 ;
    
    --
    -- Dumping data for table `reviews`
    --
    
    INSERT INTO `reviews` (`reviews_id`, `products_id`, `customers_id`, `customers_name`, `reviews_rating`, `date_added`, `last_modified`, `reviews_read`, `status`) VALUES
    (12, 274, NULL, 'Rosemary Thompson', 5, '2010-03-16 20:35:41', NULL, 161, 1),
    (5, 50, NULL, 'Mrs Deborah Jolley', 5, '2010-02-22 11:43:01', NULL, 124, 1),
    (6, 388, NULL, 'Hayley o''sullivan', 5, '2010-02-22 13:31:01', NULL, 108, 1),
    (7, 191, NULL, 'Hazel B', 5, '2010-02-23 13:31:01', NULL, 52, 1),
    (8, 142, NULL, 'Chris Dixon', 5, '2010-02-23 14:31:27', NULL, 95, 1),
    (9, 289, NULL, 'Debbie B', 4, '2010-02-26 14:33:53', NULL, 63, 1),
    (10, 124, NULL, 'Debbie Minter', 5, '2010-03-06 14:36:10', NULL, 126, 1),
    (11, 125, NULL, 'Sophie Lethbridge', 5, '2010-03-07 14:37:41', NULL, 125, 1),
    (13, 132, NULL, 'Jasmine', 5, '2010-03-23 10:37:14', NULL, 178, 1),
    (14, 50, NULL, 'Karen Lawler', 5, '2010-03-31 16:23:57', NULL, 114, 1),
    (15, 125, 0, 'Danusia Wozniak', 4, '2010-03-31 13:32:42', NULL, 100, 1),
    (16, 132, NULL, 'Raymond-Jakarta', 4, '2010-04-10 10:53:44', NULL, 170, 1),
    (17, 9, NULL, 'Sue Rich', 5, '2010-04-14 10:55:06', NULL, 87, 1),
    (18, 9, NULL, 'Miss G Brownrigg', 5, '2010-04-19 15:39:29', NULL, 83, 1),
    (19, 274, NULL, 'Maxine', 5, '2010-05-05 14:14:36', NULL, 164, 1),
    (20, 224, NULL, 'Sheryl', 5, '2010-05-07 14:16:00', NULL, 164, 1),
    (21, 480, NULL, 'Patricia Tippet', 5, '2010-05-17 20:53:30', NULL, 172, 1),
    (22, 124, NULL, 'Justine', 5, '2010-05-18 20:54:16', NULL, 108, 1),
    (23, 274, NULL, 'Emily Waines', 5, '2010-05-24 20:54:53', NULL, 153, 1),
    (24, 274, NULL, 'Lucie Corcoran', 5, '2010-05-24 20:55:54', NULL, 152, 1),
    (25, 127, NULL, 'Felicity', 5, '2010-05-26 20:56:41', NULL, 191, 1),
    (26, 274, NULL, 'Michelle, Lancaster', 5, '2010-05-29 20:57:27', NULL, 158, 1),
    (27, 86, NULL, 'Ray', 5, '2010-06-06 14:44:59', NULL, 33, 1),
    (28, 318, 4591, 'Mehmet Buyukkeskin', 5, '2010-07-14 13:11:15', NULL, 117, 1),
    (30, 364, NULL, 'W.A.Slater', 3, '2010-06-10 11:17:38', NULL, 52, 1),
    (31, 274, NULL, 'Sheila', 5, '2010-06-15 11:18:09', NULL, 128, 1),
    (32, 496, NULL, 'Karen Walker', 4, '2010-06-19 11:18:44', NULL, 45, 1),
    (33, 274, NULL, 'Anushri', 5, '2010-06-20 11:19:08', NULL, 137, 1),
    (34, 317, NULL, 'Helen, Sheffield', 5, '2010-07-01 11:19:45', NULL, 97, 1),
    (35, 176, NULL, 'Susan Braham', 4, '2010-07-02 11:20:24', NULL, 117, 1),
    (36, 124, NULL, 'Sharon Amy', 5, '2010-07-16 11:20:56', NULL, 72, 1),
    (37, 271, NULL, 'Jim Leach from Barnsley', 5, '2010-07-29 11:21:29', NULL, 91, 1),
    (38, 446, NULL, 'Keith Bowcott', 5, '2010-08-02 11:21:59', NULL, 23, 1),
    (39, 125, NULL, 'Jaswinder Kaur (Birmingham)', 5, '2010-08-04 11:22:24', NULL, 57, 1),
    (40, 274, NULL, 'Marilyn', 5, '2010-08-07 11:22:47', NULL, 116, 1),
    (41, 9, NULL, 'M Anaradoh', 5, '2010-08-07 11:23:14', NULL, 62, 1),
    (42, 350, NULL, 'Moira', 5, '2010-08-10 11:23:42', NULL, 126, 1),
    (43, 9, NULL, 'Rebecca Dowell', 5, '2010-08-12 11:24:12', NULL, 51, 1),
    (44, 9, NULL, 'Tracy Webb', 5, '2010-08-16 10:20:00', NULL, 33, 1),
    (45, 113, NULL, 'James', 5, '2010-08-17 10:20:40', NULL, 28, 1),
    (46, 125, NULL, 'Leanne', 5, '2010-08-26 10:21:12', NULL, 33, 1),
    (47, 274, NULL, 'Kelly Jones from Hockley, Essex', 4, '2010-08-27 10:21:48', NULL, 108, 1),
    (48, 9, NULL, 'Robert Moxon', 5, '2010-08-29 10:22:26', NULL, 41, 1),
    (49, 532, NULL, 'Diane Harrison', 5, '2010-09-05 10:23:00', NULL, 27, 1),
    (50, 411, NULL, 'Jason Evans. Saltdean, Brighton', 4, '2010-09-06 10:23:43', NULL, 55, 1),
    (51, 176, NULL, 'Jenny S', 5, '2010-09-12 10:24:09', NULL, 92, 1),
    (52, 524, NULL, 'Emma Killian (nearly Plater!!!)', 5, '2010-09-15 10:24:40', NULL, 42, 1),
    (53, 274, NULL, 'Susanne McDavitt. Paisley', 5, '2010-09-20 10:25:18', NULL, 104, 1),
    (54, 0, NULL, '', NULL, NULL, NULL, 0, 1),
    (55, 271, 5092, 'Jinan Al- Dahhan', 5, '2010-11-02 21:28:38', NULL, 51, 1),
    (56, 9, 5598, 'Jo-anne Young', 5, '2011-01-26 00:51:25', NULL, 18, 1),
    (57, 316, NULL, 'Jack Mickleburgh', 4, '2010-10-03 14:49:36', NULL, 44, 1),
    (58, 480, NULL, 'Gayle Jones', 5, '2010-10-14 14:50:25', NULL, 54, 1),
    (59, 9, NULL, 'Ellie Morton', 5, '2010-10-23 14:51:10', NULL, 17, 1),
    (60, 462, NULL, 'H. Burely', 5, '2010-10-24 14:52:19', NULL, 11, 1),
    (61, 124, NULL, 'Megan Pirie', 4, '2010-11-01 14:52:04', NULL, 13, 1),
    (62, 274, NULL, 'R.Dhiri Beaconsfield', 4, '2010-11-01 14:55:44', NULL, 59, 1),
    (64, 565, NULL, 'Joanne Weston', 5, '2010-11-03 14:56:17', NULL, 56, 1),
    (65, 124, NULL, 'Nadine Salman', 3, '2010-11-07 14:56:55', NULL, 20, 1),
    (66, 176, NULL, 'R. Dean', 5, '2010-11-13 15:00:21', NULL, 28, 1),
    (67, 132, NULL, 'Nicole Peake', 5, '2010-11-14 15:02:45', NULL, 31, 1),
    (68, 181, NULL, 'Ellen Howard-Norwich', 5, '2010-11-29 15:04:11', NULL, 15, 1),
    (69, 125, NULL, 'Kate', 5, '2010-11-30 15:04:50', NULL, 24, 1),
    (70, 429, NULL, 'Jane', 5, '2010-12-03 15:07:22', NULL, 16, 1),
    (71, 53, NULL, 'Neil Campbell', 5, '2010-12-08 15:08:42', NULL, 12, 1),
    (72, 318, NULL, 'Anna Davison', 5, '2010-12-10 15:09:36', NULL, 81, 1),
    (73, 512, NULL, 'Peter Golding', 5, '2011-01-11 15:10:22', NULL, 10, 1),
    (74, 350, NULL, 'linda kapur', 5, '2011-01-27 15:11:26', NULL, 50, 1),
    (75, 487, NULL, 'Liz Mayers', 5, '2011-02-01 15:13:14', NULL, 54, 1),
    (76, 9, NULL, 'Jill Vice', 5, '2011-02-02 15:14:05', NULL, 19, 1),
    (77, 176, NULL, 'Lynn Irving', 5, '2011-02-10 15:14:05', NULL, 19, 1),
    (78, 656, NULL, 'W. Leggott', 5, '2011-02-13 15:14:05', NULL, 19, 1),
    (79, 527, NULL, 'Oscar, 5, '2011-02-13 15:14:05', NULL, 19, 1),
    (80, 180, NULL, 'M', 5, '2011-02-13 15:14:05', NULL, 19, 1),
    (81, 643, NULL, 'Elaine Hayward', 5, '2011-02-22 15:14:05', NULL, 19, 1),
    (82, 499, NULL, 'Isabel Rinne', 5, '2011-02-23 15:14:05', NULL, 19, 1),
    (84, 518, NULL, 'Gregory Smith', 5, '2011-02-27 15:14:05', NULL, 19, 1),
    (85, 271, NULL, 'Lucy Rogers', 5, '2011-02-28 15:14:05', NULL, 19, 1),
    (86, 274, NULL, 'Rebecca Francis', 5, '2011-03-02 15:14:05', NULL, 19, 1),
    (87, 571, NULL, 'Jean Taylor', 5, '2011-03-05 15:14:05', NULL, 19, 1),
    (88, 318, NULL, 'Gerard Cunningham', 5, '2011-03-06 15:14:05', NULL, 19, 1),
    (89, 298, NULL, 'D Longworth', 5, '2011-03-13 15:14:05', NULL, 19, 1),
    (90, 499, NULL, 'Sam', 5, '2011-03-14 15:14:05', NULL, 19, 1),
    (91, 176, NULL, 'Ruby-May Kinch', 5, '2011-03-15 15:14:05', NULL, 19, 1),
    (92, 124, NULL, 'P. Southard', 5, '2011-03-19 15:14:05', NULL, 19, 1),
    (93, 691, NULL, 'Paula Williams', 5, '2011-03-19 15:14:05', NULL, 19, 1),
    (94, 740, NULL, 'Kathleen Nicol', 5, '2011-03-21 15:14:05', NULL, 19, 1),
    (95, 99, NULL, 'Judith Owens', 5, '2011-03-23 15:14:05', NULL, 19, 1),
    (96, 125, NULL, 'Kirsty Garrod', 5, '2011-03-29 15:14:05', NULL, 19, 1),
    (97, 9, NULL, 'Margo', 5, '2011-03-30 15:14:05', NULL, 19, 1),
    (98, 124, NULL, 'Vanessa Petty', 5, '2011-04-05 15:14:05', NULL, 19, 1),
    (99, 32, NULL, 'Pippa Sibbald', 5, '2011-04-07 15:14:05', NULL, 19, 1),
    (100, 9, NULL, 'Ally John', 5, '2011-04-08 15:14:05', NULL, 19, 1),
    (101, 274, NULL, 'S. Caiger', 5, '2011-04-09 15:14:05', NULL, 19, 1),
    (102, 246, NULL, 'Kirsty Smithson', 5, '2011-04-11 15:14:05', NULL, 19, 1),
    (103, 499, NULL, 'J. Brocklehurst', 5, '2011-04-11 15:14:05', NULL, 19, 1),
    (104, 503, NULL, 'Rachel Town', 5, '2011-04-11 15:14:05', NULL, 19, 1),
    (105, 318, NULL, 'Janet Sixsmith', 5, '2011-04-13 15:14:05', NULL, 19, 1),
    (106, 224, NULL, 'Henrik Persson', 5, '2011-04-14 15:14:05', NULL, 19, 1),
    (107, 274, NULL, 'Nuala', 5, '2011-04-19 15:14:05', NULL, 19, 1),
    (108, 9, NULL, 'Jan Larkin', 5, '2011-04-26 15:14:05', NULL, 19, 1),
    (109, 176, NULL, 'Laura Simpson', 5, '2011-04-30 15:14:05', NULL, 19, 1),
    (110, 274, NULL, 'Sarah', 5, '2011-05-01 15:14:05', NULL, 19, 1),
    (111, 724, NULL, 'Shirley', 5, '2011-05-08 15:14:05', NULL, 19, 1),
    (112, 246, NULL, 'Ben Waters', 5, '2011-05-08 15:14:05', NULL, 19, 1),
    (113, 351, NULL, 'Pauline Cullen', 5, '2011-05-09 15:14:05', NULL, 19, 1),
    (115, 607, NULL, 'Sheila', 5, '2011-05-27 15:14:05', NULL, 19, 1),
    (116, 124, NULL, 'Sharon Mullock', 5, '2011-05-29 15:14:05', NULL, 19, 1),
    (117, 351, NULL, 'K Robson', 5, '2011-05-29 15:14:05', NULL, 19, 1);
    Any ideas what's wrong, please?

    Many thanks,

    Gary

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Why Does this SQL not work?

    The error you've reported is not coming from the SQL that you posted. There's no date-time matching that in the error in the SQL.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Feb 2009
    Posts
    120
    Plugin Contributions
    0

    Default Re: Why Does this SQL not work?

    Thanks for the reply.

    Mmmm, that's strange!

    Do you have any idea where the error would be coming from? the full error message when uploading that table is:


    Error

    SQL query:

    -- -- Dumping data for table `reviews` -- INSERT INTO `reviews` (`reviews_id`, `products_id`, `customers_id`, `customers_name`, `reviews_rating`, `date_added`, `last_modified`, `reviews_read`, `status`) VALUES (12, 274, NULL, 'Rosemary Thompson', 5, '2010-03-16 20:35:41', NULL, 161, 1), (5, 50, NULL, 'Mrs Deborah Jolley', 5, '2010-02-22 11:43:01', NULL, 124, 1), (6, 388, NULL, 'Hayley o''sullivan', 5, '2010-02-22 13:31:01', NULL, 108, 1), (7, 191, NULL, 'Hazel B', 5, '2010-02-23 13:31:01', NULL, 52, 1), (8, 142, NULL, 'Chris Dixon', 5, '2010-02-23 14:31:27', NULL, 95, 1), (9, 289, NULL, 'Debbie B', 4, '2010-02-26 14:33:53', NULL, 63, 1), (10, 124, NULL, 'Debbie Minter', 5, '2010-03-06 14:36:10', NULL, 126, 1), (11, 125, NULL, 'Sophie Lethbridge', 5, '2010-03-07 14:37:41', NULL, 125, 1), (13, 132, NULL, 'Jasmine', 5, '2010-03-23 10:37:14', NULL, 178, 1), (14, 50, NULL, 'Karen Lawler', 5, '2010-03-31 16:23:57', NULL, 114, 1), (15, 125, 0, 'Danusia Wozniak', 4, '2010-03-31 13[...]

    MySQL said: Documentation
    #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 '2011-02-13 15:14:05', NULL, 19, 1),
    (80, 180, NULL, 'M', 5, '2011-02-13 15:14:0' at line 74



    Thanks again,

    Gary

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Why Does this SQL not work?

    I take it back. Looks like you typed the error message and there was a typo in there, but I should have been able to work that out.

    There's no obvious error from a visual inspection, but I'm going to try to run the SQL in a database were and see what happens.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Why Does this SQL not work?

    Duh. Should have spotted this on visual inspection ... entry for review_id 79 is missing a single quote after Oscar. Can't say how it comes to be missing though.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Feb 2009
    Posts
    120
    Plugin Contributions
    0

    Default Re: Why Does this SQL not work?

    Whooo hoooo....it worked.

    Thank you so much for your help. So simple yet, it was driving me mad!!!!

    Gary

 

 

Similar Threads

  1. v150 why does this code not work?
    By nazca in forum General Questions
    Replies: 6
    Last Post: 9 Oct 2013, 02:19 PM
  2. v151 my custom jQuery code does not work, why??
    By tlyczko in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 27 Dec 2012, 12:09 AM
  3. v139h why does not $zco_notifier->notify(...) work for ipn_main_handler.php?
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 9 Oct 2012, 02:00 AM
  4. Why does it not work? Please help!
    By pasb in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 22 Jul 2009, 04:01 PM
  5. Why does this only work in the product listing - CSS puzzle
    By budfox in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Feb 2007, 08:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR