little.boy
یک شنبه 14 تیر 1388, 10:43 صبح
من این کد رو برای ایحاد یک بانک می زنم ولی به یک error بر می خورم که سر در نمیارم برا چیه
ممنون می شم کسی بتونه کمک کنه
کد:
CREATE TABLE ad_db
(
ad_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
title varchar(30) not null,
content varchar(50) not null,
cat_id smallint not null,
type_id smallint not null,
customer_id smallint not null,
unit_count int,
unit_price int,
insertingDate date,
modifyingDate date,
INDEX (cat_id),
INDEX (type_id),
INDEX (customer_id),
FOREIGN KEY(cat_id) REFERENCES category_db(id),
FOREIGN KEY(type_id) REFERENCES type_db(id),
FOREIGN KEY(customer_id) REFERENCES customer_db(id),
PRIMARY KEY(ad_id)
)ENGINE=INNODB;
error هم به این صورت هست:
Error code 1005, SQL state HY000: Can't create table '.\mynewdatabase\ad_db.frm' (errno: 150)
ممنون می شم کسی بتونه کمک کنه
کد:
CREATE TABLE ad_db
(
ad_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
title varchar(30) not null,
content varchar(50) not null,
cat_id smallint not null,
type_id smallint not null,
customer_id smallint not null,
unit_count int,
unit_price int,
insertingDate date,
modifyingDate date,
INDEX (cat_id),
INDEX (type_id),
INDEX (customer_id),
FOREIGN KEY(cat_id) REFERENCES category_db(id),
FOREIGN KEY(type_id) REFERENCES type_db(id),
FOREIGN KEY(customer_id) REFERENCES customer_db(id),
PRIMARY KEY(ad_id)
)ENGINE=INNODB;
error هم به این صورت هست:
Error code 1005, SQL state HY000: Can't create table '.\mynewdatabase\ad_db.frm' (errno: 150)