user表: 
create table user 

userid integer not null auto_increment primary key, 
username varchar(12) not null 

type=innodb;[命令成功完成]password表: create table password 

userid integer not null, 
password varchar(12) not null, 
index (userid), 
foreign key (userid) references user (userid) 
on delete cascade 
on update cascade 
);
当我们删除了user表中的数据之后,password表中的数据没有对应的删除!
小弟请教了!

解决方案 »

  1.   

    重要的信息用session,比如登录信息等非重要信息用cookie
      

  2.   

    改了不行,改了要报[提示错误:ERROR 1005: Can't create table '.\test\password.frm' (errno: 150)]
      

  3.   

    SHOW INNODB STATUS;
    用这条命令看一下报错信息
      

  4.   

    刚才弄了一下,加了type=innodb行了,谢谢!
    对了,加上index (userid)是什么意思呀,还有type=innodb是什么意思
      

  5.   

    index索引 ,要支持事务表类型要一至.都是INNODB