Still bugging me..
| From: | David VanHorn | Date: | Fri, 11 Aug 2000 20:17:42 +0000 |
| Subject: | Still bugging me.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11396@lists.php.net to get a copy of this message | ||
I have the results of three mysql queries, which may contain zero or more (or many many more) records.
I'm trying to find an efficient way to trim this set and only look at those which have one field in common.
IOW:
After three queries, I have these sets:
$Result_A
$Result_B
$Result_C
Each has a field called reference, (plus several other fields) and the records within Result_A might have reference = 10,11,12,13. Result_B might have reference = 11,12,13,14, and $Result_C might have reference = 12,13,14,15,16
What I want is to discard, or to only pay attention to the records where in this case, reference is 12 or 13.
The problem is that I have to search on other fields in the records to find out which are potentially interesting.
I do need all the data for the congruent set though, not just the reference numbers, although I suppose I could then re-fetch them, but it seems a waste.
In some cases, these may be large sets, so I really don't want to loop through. If each returned 1000 records, then the result would be a frighteningly large search.
--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9