Dear Carl,
> What I want to-do is create a select statement that lets me select all
> the contacts from the contacts table that have followed link 1 and
link
> 2. I'm finding this hard without subselects.
Maybe I miss out on something, but I would do it like this:
SELECT * FROM contact INNER JOIN events USING (eventid) WHERE
events.link_id = 1 AND events.link_id = 2
Regards,
--
Stefan Hinz
Geschäftsführer / CEO iConnect e-commerce solutions GmbH
# www.js-webShop.com www.iConnect.de
# Gustav-Meyer-Allee 25, 13355 Berlin
# Tel: +49-30-46307-382 Fax: +49-30-46307-388
----- Original Message -----
From: "Carl Chambers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 09, 2001 11:40 AM
Subject: SELECT
> Hi,
>
> I'm a bit stuck at the moment with a select query. I have 2 tables a
> contact table and an events table. They are joined together by contact
> id.
>
> The data is stored in the events table like this:
>
> eventid link id contact id
> 1 1 1 *
> 2 2 1 *
> 3 1 2
>
>
>
> What I want to-do is create a select statement that lets me select all
> the contacts from the contacts table that have followed link 1 and
link
> 2. I'm finding this hard without subselects.
>
>
> Thanks
>
> Carl Chambers
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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