NYCPHP Meetup

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

Phil Powell soazine at erols.com
Mon Aug 18 13:33:36 EDT 2003


So I found out.  How in the world then do you constrain your fields and do
cascade deletes?

Phil
----- Original Message ----- 
From: "Hans Zaunere" <hans at nyphp.org>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Monday, August 18, 2003 11:09 AM
Subject: Re: [nycphp-talk] mySQL is kicking my butt Pt II


>
>
> 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
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list