Re: Thinking out loud - a continuation...

From: Date: Thu, 22 Mar 2012 16:34:33 +0000
Subject: Re: Thinking out loud - a continuation...
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-317186@lists.php.net to get a copy of this message
[snip]
Sorry, I just realized I didn't make the optimization explicitly obvious... when I say "Select the children" I mean to select them using an IN( id1, id2, id3 ) clause instead of a query for each. This is why we build the array of parent IDs (also I wrote build an array of "child IDs", it should have read "parent IDs" and has been fixed above :). [/snip]
SELECT DISTINCT children FROM table WHERE column1 IN(id1, id2, id3....) ? I am sure I am not following you now. Maybe I didn't explain clearly?

« previous php.general (#317186) next »