Op Saturday 17 March 2001 22:04 kon Denis Mettler het niet nalaten op te 
merken:
> Hi there,
>
> Another problem.
> i have the following tables:
>
> table 1:
> id, primary key, auto increment
> name varchar(50)
> city varchar(50)
> phone varchar(25)
>
>
> table 2:
> categorie_id, primary key, auto_increment
> kategorie varchar(50)
>
>
> in table one i have the contacts
> and in table two the categories (Business, privat...)
>
> but how can i link these tables for a query.
> i ask because i know that mysql doesn't support foreign keys.
>
> thanks in advance
> denis
>

If your contacts will always belong to one category, you can add a 
'categorie_id' to your first table. If a contact can belong to more than one 
category, you need an intersection table, containing contact_id and 
categorie_id.

Marc

---------------------------------------------------------------------
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

Reply via email to