Where's the problem here?

Discussion in 'Databases' started by Jamie Lister, May 10, 2006.

  1. #1
    The return I get from SQL is :
    
    ERROR: Unclosed quote @ 535
    STR: '
    SQL: -- 
    -- Dumping data for table `dir_cat`
    -- 
    HTML:

    Here's a sample of what I'm trying to upload :

    -- phpMyAdmin SQL Dump
    -- version 2.6.4-pl2
    -- http://www.phpmyadmin.net
    -- 
    -- Host: localhost
    -- Generation Time: Apr 26, 2006 at 03:56 AM
    -- Server version: 4.0.25
    -- PHP Version: 4.3.11
    -- 
    -- 
    -- 
    
    -- --------------------------------------------------------
    
    -- 
    -- Table structure for table `dir_cat`
    -- 
    
    CREATE TABLE `dir_cat` (
     `cat_id` int(11) NOT NULL default '0',
     `parent_id` int(11) NOT NULL default '0',
     `name` varchar(50) NOT NULL default '',
     `description` varchar(255) NOT NULL default '',
     `indexdisplay` char(1) NOT NULL default '',
     KEY `name` (`name`),
     KEY `cat_id` (`cat_id`),
     KEY `parent_id` (`parent_id`)
    ) TYPE=MyISAM;
    
    -- 
    -- Dumping data for table `dir_cat`
    -- 
    
    
    
    INSERT INTO `dir_cat` VALUES (1, 0, 'The Shopping Directory', 'Shopping.', 'Y');
    INSERT INTO `dir_cat` VALUES (2, 1, 'Shows - Tickets', 'Online shopping', 'Y'); 
    INSERT INTO `dir_cat` VALUES (3, 2, 'Sport', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES (4, 2, 'Concerts', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES (5, 2, 'Theatre', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES (6, 2, 'Cinema', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES (7, 1, 'Electronics', 'Online shopping', 'Y'); 
    INSERT INTO `dir_cat` VALUES ( 8, 7, 'TV & Video', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES ( 9, 7, 'MP3', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES ( 10, 7, 'Cameras', 'Online shopping', 'N'); 
    INSERT INTO `dir_cat` VALUES ( 11, 1, 'Sports goods', 'Online shopping', 'Y'); 
    
    HTML:

     
    Jamie Lister, May 10, 2006 IP
  2. briansol

    briansol Well-Known Member

    Messages:
    221
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    #2
    That & might be messing things up. Try writing it as
    
    &
    
    Code (markup):
     
    briansol, May 11, 2006 IP
  3. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #3
    Sounds like one of the strings you are trying to insert contains a '
    The error says
    So can you paste here line 535 if you can't spot it your self.
     
    dct, May 11, 2006 IP
  4. Xig

    Xig Peon

    Messages:
    75
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yup, I'd agree with DCT - it might be 535 or 534 or around there.
     
    Xig, May 11, 2006 IP
  5. Jamie Lister

    Jamie Lister Peon

    Messages:
    421
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Actually the problem was in a few syntax errors.
    For example, it wasnt accepting the ' in the world "can't".
    As soon as i took it out, it ran perfectly.
    Thanks all.
     
    Jamie Lister, May 11, 2006 IP
  6. Xig

    Xig Peon

    Messages:
    75
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I think that's what we meant ... :D

    I don't think we helped, but we tried ;) Glad you solved it
     
    Xig, May 11, 2006 IP