RE: [PHP-DB] MySQL Query

From: Date: Sun, 20 Nov 2005 02:39:58 +0000
Subject: RE: [PHP-DB] MySQL Query
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-40704@lists.php.net to get a copy of this message
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" <larentium@hosthive.com> To: "[PHP-DB]" <php-db@lists.php.net> 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


« previous php.db (#40704) next »