NYCPHP Meetup

NYPHP.org

[nycphp-talk] mySQL is kicking my butt Pt II

Hans Zaunere hans at nyphp.org
Mon Aug 18 11:09:02 EDT 2003



Phil Powell wrote:

> alter table fs_usermetadata add foreign key fs_user_category_id 
>  references fs_user_category(fs_user_category_id)
>  on delete cascade
> 
> Isn't this legitimate code to add a foreign key constraint to fs_user_category_id in table fs_usermetadata referencing fs_user_category.fs_user_category_id?

MySQL's default table handler, MyISAM, doesn't support foreign keys and so forth.  So, unless this is an InnoDB DB, it won't work.

http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html


H




More information about the talk mailing list