Re: [PHP] Delete row in a lookup table

2007-08-27 Thread nitrox .
Wow, I actually managed to get this working now. Thanks to Richard and stut I realized I was on the right track but had my code screwed up. Richard your right, a primary key column was silly but was a temporary fix. It allowed me to delete with one column and not have to reference a second. So

Re: [PHP] Delete row in a lookup table

2007-08-26 Thread Richard Lynch
On Sat, August 18, 2007 6:31 pm, nitrox . wrote: Is it not considered good practice to have a primary key on a lookup table for a database? I have 3 tables setup, games, memberleagues and members. The memberleagues table holds the id of the games table and members table. The problem I have is

[PHP] Delete row in a lookup table

2007-08-18 Thread nitrox .
Hi all, Is it not considered good practice to have a primary key on a lookup table for a database? I have 3 tables setup, games, memberleagues and members. The memberleagues table holds the id of the games table and members table. The problem I have is that Im not sure how to delete a row

Re: [PHP] Delete row in a lookup table

2007-08-18 Thread Larry Garfield
Whether or not it's good practice depends on who you ask. :-) Every table should have a primary key. Primary keys, however, may span multiple columns. That's perfectly legal. In some cases that primary key may span every column, but generally that's a sign of bad design unless you're