Could you post your create table statement? It should be something like:
CREATE TABLE relation_person_car( personID int 11 NOT NULL, carID int 11 NOT NULL, PRIMARY KEY (personID,carID) ); > -----Original Message----- > From: Alliax [mailto:[EMAIL PROTECTED]] > Sent: Saturday, December 14, 2002 9:16 AM > To: Adolfo Bello; [EMAIL PROTECTED] > Subject: RE: BEGINNER: in mysql, better to do 1 table for one > relationship, even with a one to one relation ? > > > Hello, > I've tried your way, but my SQL reports error, that I have > specified more than ONE primary key, so I can't do the > primary key on both fields. Is that a mySQL 3.X limitation ? > My tables are ISAM. Following your advice, I've deleted the > relation_person_carID, so only cardID and personID are left i > nthe table, with no primary key. Is it a good idea, and is it > safe, not to have a primary key ? > > Cheers, > Damien COLA > > > -----Message d'origine----- > > 3) table relation_person_car > > personID int 11 > > carID int 11 > > PRIMARY KEY (personID,carID) > > > > something like : > > > table relation_person_car > > > relation_personID primary int 11 autoincrement > > > personID int 11 > > > carID int 11 > > > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php