In article <[EMAIL PROTECTED]>, "Dan Tappin" <[EMAIL PROTECTED]> writes:
> Hi Shawn, > First off thanks for the tip. I had read that page once already but after reading > twice again after your post I realized that the > answer was right there. Wrapping that concept around my brain really hurt but I get > it now. > I had this: > CREATE TABLE projects > ( > id int auto_increment, > id_project int, > id _client, > PRIMARY KEY (id) > ) > When I should have this: > CREATE TABLE projects > ( > id int auto_increment, > id_client int, > PRIMARY KEY (id_client, id) > ) I would not do that since it's absolutely nonstandard and works only with MyISAM tables. Apparently id_clientkey is the number of records with the same id_client and smaller ids. This can be easily calculated on the fly and thus should not be stored in the table. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]