#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    3
    Rep Power
    0
    I have a problem with mysql (for win 3.22.34):
    I have sql file ehich is
    # MySQL dump 6.0
    #
    # Host: localhost Database: auction
    #--------------------------------------------------------
    # Server version 3.22.34

    #
    # Table structure for table 'products'
    #
    CREATE TABLE products (
    name text,
    category varchar(30),
    description text,
    quantity int(3),
    PRIMARY KEY (pid)
    ); (line 29)
    and again a table and "#" at the very end. When I run this sql against a database it give an error "there is syntax error in line 29 etc.". However I could not see any error in this file. Can you see anytihng?
    All helps are greatly appreciated.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    15
    What's the pid column? You're declaring a primary key on a column that doesn't exist.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    3
    Rep Power
    0
    Sorry I forgot to put the last column:
    pid int(7) DEFAULT '0' NOT NULL auto_increment,
    Now do you have any solution.I'm going to be crazy if I don't solve this problem
  6. #4
  7. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    Nothing appears to be wrong. However, the error is in line 29 and you don't have 29 lines posted. Post the complete listing.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    3
    Rep Power
    0
    # MySQL dump 6.0
    #
    # Host: localhost Database: auction
    #--------------------------------------------------------
    # Server version 3.22.34

    #
    # Table structure for table 'products'
    #
    CREATE TABLE products (
    name text,
    category varchar(30),
    description text,
    quantity int(3),
    start_bid varchar(20),
    current_bid varchar(20),
    current_bid_uid varchar(7),
    num_bids int(4),
    location varchar(40),
    country varchar(40),
    starts timestamp(14),
    ends timestamp(14),
    seller int(7),
    payment text,
    picture text,
    featured char(3),
    pid int(7) DEFAULT '0' NOT NULL auto_increment,
    PRIMARY KEY (pid)
    ); (This line)

    Mysql said the error is on that line but there seems no error. I'm running 3.22.34 for win. Thanks for your reply.
    p.s:I forgot to say I'm using mysql administrator for win version 1.04.

    [This message has been edited by copper (edited June 17, 2000).]
  10. #6
  11. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    18
    I don't know what to tell you as I cut and pasted that code and it worked fine. The problem isn't the query.

Similar Threads

  1. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 08:27 AM
  2. Replies: 1
    Last Post: February 8th, 2004, 01:59 PM
  3. Replies: 1
    Last Post: January 22nd, 2004, 07:56 AM
  4. file stream problem associated with BCB5-->6 transfer
    By Marylin in forum C Programming
    Replies: 0
    Last Post: July 30th, 2003, 01:12 PM
  5. MySQL PHP problem
    By The Pie Man in forum PHP Development
    Replies: 6
    Last Post: April 24th, 2001, 05:17 PM

IMN logo majestic logo threadwatch logo seochat tools logo