This is what I get:
[root@localhost:3306] ERROR 1005: Can't create table '.\msgtest\msgbox.frm' (errno: 150)
With this:
CREATE TABLE msgbox (
mid int(20) NOT NULL auto_increment,
uid int(11) NOT NULL default '0',
to varchar(30) NOT NULL default '',
from varchar(30) NOT NULL default '',
subject varchar(255) NOT NULL default '',
message text NOT NULL,
time timestamp NOT NULL,
PRIMARY KEY (mid),
FOREIGN KEY (uid) REFERENCES user(uid) ON UPDATE CASCADE ON DELETE CASCADE
) TYPE=InnoDB;
I added the `` on user because it kept giving back this error:
[root@localhost:3306] ERROR 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 'user(uid) ON UPDATE CASCADE ON DELETE CASCADE
) TYPE=InnoDB' a
if it didn't have it. But now I'm getting that error at the top, so what could this be?