|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
What's the pid column? You're declaring a primary key on a column that doesn't exist.
|
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
Nothing appears to be wrong. However, the error is in line 29 and you don't have 29 lines posted. Post the complete listing.
|
|
#5
|
|||
|
|||
|
# 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).] |
|
#6
|
|||
|
|||
|
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.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > an sql file problem in mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|