in reply to Re: Re: Re: Re: many to many with Class::DBI
in thread many to many with Class::DBI
No, the code worked because the code (as well as the exmple data) is more restrictive than the data-definition. You can define the n-m table as
the data fits, the program works, and the Class::DBI definition actualy meets the data-definition as close as possible (AFAI understand it at a quick glance), but given the example-data, nothing really changed. If the data-definition allows for more than the program actualy does, thats undesirable and bad style and a big problem in the future, but not a problem now.mysql> create table user_role ( -> user_id int(11) not null default '0', -> role_id int(11) not null default '0', -> primary key (user_id, role_id), -> foreign key user_fk (user_id) references user (id), -> foreign key role_fk (role_id) references role (id) -> );
may well be that I don't understand you at all, I'm really tired and the finer points of english conversation escape me all the time....
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: many to many with Class::DBI
by hardburn (Abbot) on Feb 12, 2004 at 16:57 UTC | |
by Tomte (Priest) on Feb 12, 2004 at 17:16 UTC |