superdezign wrote:Still not working? Take the "primary key" part off of the id field, and then later on add "primary key(id)"
nop, that didn't work... thnks for your help.
I created the Database MOTOS
then I made 3 tables
vehicle_imagelist
Code: Select all
CREATE TABLE vehicle_config (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
username CHAR(20),
password CHAR(20),
installed NUMERIC(10),
dealer CHAR(60),
email CHAR(60),
phone CHAR(15)
)
That one was OK
vehicle_imagelist
Code: Select all
CREATE TABLE $dbimg (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
ccode NUMERIC(15),
thumb CHAR(23),
image CHAR(23)
)
That one was also OK
Now I want to create the third table, this one gives me the errors:
vehicle_inventory
Code: Select all
CREATE TABLE vehicle_inventory (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
ccode NUMERIC(15),
added NUMERIC(10),
updated NUMERIC(10),
viewed NUMERIC(10),
numimages NUMERIC(2),
stock CHAR(20),
vin CHAR(30),
year NUMERIC(4),
make CHAR(20),
model CHAR(30),
condition CHAR(4),
category CHAR(20),
mileage CHAR(9),
price CHAR(15),
exterior CHAR(30),
interior CHAR(30),
body CHAR(20),
doors CHAR(1),
engine CHAR(40),
fuel CHAR(20),
trans CHAR(20),
stereo CHAR(40),
comments TEXT
)
In this one the error that gives me when I click Continue is : (i'll copy paste) , and please note that the spaces between dissapear (in some of them):
Code: Select all
Error
consulta SQL:
CREATE TABLE vehicle_inventory(
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
ccode NUMERIC( 15 ) ,
added NUMERIC( 10 ) ,
updated NUMERIC( 10 ) ,
viewed NUMERIC( 10 ) ,
numimages NUMERIC( 2 ) ,
stockCHAR( 20 ) ,
vinCHAR( 30 ) ,
year NUMERIC( 4 ) ,
makeCHAR( 20 ) ,
modelCHAR( 30 ) ,
conditionCHAR( 4 ) ,
categoryCHAR( 20 ) ,
mileageCHAR( 9 ) ,
priceCHAR( 15 ) ,
exteriorCHAR( 30 ) ,
interiorCHAR( 30 ) ,
bodyCHAR( 20 ) ,
doorsCHAR( 1 ) ,
ENGINE CHAR( 40 ) ,
fuelCHAR( 20 ) ,
transCHAR( 20 ) ,
stereoCHAR( 40 ) ,
comments TEXT
)
MySQL ha dicho: Documentación
#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 'condition CHAR(4),
category CHAR(20),
mileage CHAR(9),
price CHAR(15),
exter' at line 12