SunQuest
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old June 14th, 2000, 01:46 PM
copper copper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 copper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #2  
Old June 15th, 2000, 07:25 AM
Kyuzo Kyuzo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Location: Annapolis, Maryland US
Posts: 113 Kyuzo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
What's the pid column? You're declaring a primary key on a column that doesn't exist.

Reply With Quote
  #3  
Old June 17th, 2000, 07:58 AM
copper copper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 copper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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 URL

Reply With Quote
  #4  
Old June 17th, 2000, 08:49 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
Nothing appears to be wrong. However, the error is in line 29 and you don't have 29 lines posted. Post the complete listing.

Reply With Quote
  #5  
Old June 17th, 2000, 09:19 AM
copper copper is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 3 copper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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).]

Reply With Quote
  #6  
Old June 17th, 2000, 11:17 AM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 13
Send a message via AIM to rod k
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > an sql file problem in mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway