I have been browsing on mysql manual
with not much of success.I am trying to put 2 foreign keys(from
different external table) on my table, but if I put the 2nd one it
fails.....here is my table

CREATE TABLE pack_accomodation (
                id int(16) NOT NULL auto_increment,
                pack_id int(16) NOT NULL ,
                hotel_id int(16) NOT NULL ,
                PRIMARY KEY (id),
                INDEX (pack_id),
                FOREIGN KEY (pack_id) REFERENCES pack(items_no)
                ON DELETE CASCADE
                ON UPDATE CASCADE,
                INDEX (hotel_id),
                FOREIGN KEY (hotel_id) REFERENCES hotel(items_no)

I can get rid of the 2nd foreign key with programming, but I think it
should be possible to have them both...I just I cant figure out why it
fails with this error:
ERROR 1005 (HY000): Can't create table './tabasam/pack_accomodation.frm'
(errno: 150) For description of the error

Thanks guys, any help would really appreciate it.

Extra details:
OSS:Gentoo Linux-2.6.25-r8
Hardware:msi geforce 8600GT asus p5k-se

Reply via email to