MySQL Query

MySQL Query

am 20.11.2005 03:29:25 von Larentium

------=_NextPart_000_02A1_01C5ED3F.8CD72640
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

I'm tring to run this query to find orphan entries.

SELECT c.eventid, e.ID=20
FROM col_links c left outer join calendar_v2 e=20
ON c.eventid =3D e.ID
LIMIT 0, 999;=20

Then I have to scan the list to find entries where
e.ID equals NULL.

I was wondering if anyone know how to expand this
query with a WHERE clause that would find just the
orphan instances.

Thanks,

Keith
------=_NextPart_000_02A1_01C5ED3F.8CD72640--

RE: MySQL Query

am 20.11.2005 03:39:58 von Bastien Koert

SELECT c.eventid, e.ID
FROM col_links c left outer join calendar_v2 e
ON c.eventid = e.ID
where e.id is null
LIMIT 0, 999;


>From: "Keith Spiller"
>To: "[PHP-DB]"
>Subject: [PHP-DB] MySQL Query
>Date: Sat, 19 Nov 2005 19:29:25 -0700
>
>Hi,
>
>I'm tring to run this query to find orphan entries.
>
>SELECT c.eventid, e.ID
>FROM col_links c left outer join calendar_v2 e
>ON c.eventid = e.ID
>LIMIT 0, 999;
>
>Then I have to scan the list to find entries where
>e.ID equals NULL.
>
>I was wondering if anyone know how to expand this
>query with a WHERE clause that would find just the
>orphan instances.
>
>Thanks,
>
>Keith

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php