On Sat, 17 Mar 2001, Denis Mettler wrote:
> 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
Thinking of your ER diagram will help: your 1st table originates from entity 'contact'
and your 2nd table from entity 'category'. In between you have a relationship linking
them. So the relationship's table is what you need and it consists of (id,category_id).
regards,
thalis
---------------------------------------------------------------------
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