[FX.php List] Multiple requests with an additional constraint...
Bob Patin
bob at patin.com
Mon Oct 30 23:46:14 MST 2006
Thanks Steve; as you can see, I've been working late tonight...
That's pretty much what I did, but it ended up being easier to query
for the strings first, then to cull the foundset using the date
range. It's too bad there isn't a bit more flexibility; it would've
been so easy if I could've either done a "requery" of the foundset or
done a mixture of AND and OR in one query.
Chris, are you listening? :)
What do you think, is that doable?
Thanks for your help Steve! Now to sleep!
Bob
On Oct 31, 2006, at 12:09 AM, Steve Winter wrote:
> Bob,
>
> I'd be inclined just to use a foreach through the returned set, so
> you'd
> end up with something like;
>
> foreach($returnedData as $key -> $value) {
> if($value['domainName'][0] == 'domain 1' ||
> $value['domainName'][0] == 'domain 2' ||
> $value['domainName'][0] == 'domain 3') {
> // output whatever you want here }}
>
> Cheers
> Steve
>
>> Steve,
>>
>> Thanks for the suggestions; both very good... your 2nd suggestion
>> sounds like a good one.
>>
>> So let's assume I did the date search first (it would probably reduce
>> the found set more than the other search. Would I then have to loop
>> thru the records to reduce them, or is there another mechanism in PHP
>> that would search the array for me?
>>
>> I know how to loop thru the found set, but that seems slower than
>> perhaps some other type of query might be. My knowledge of PHP
>> extends just far enough to get around in FX, but other than some
>> fairly minor string manipulation and date parsing, I'm a lightweight
>> with PHP... :)
>>
>> So if you have a suggestion on another way to cull the found set
>> other than a loop, I'd appreciate any insights...
>>
>> Thanks again,
>>
>> Bob
>>
>>
>> On Oct 30, 2006, at 10:47 PM, Steve Winter wrote:
>>
>>> 1. You could write a script to perform the find for you setting
>> global
>>> fields to the values you wish to search on from FX, then calling the
>>> script to do the actual find...
>>>
>>> 2. perform the find with FX that will produce the smallest set of
>>> records,
>>> either the date find or the domain name find, then do the second
>>> find in
>>> PHP... so if you did the date find from FX, then ran a loop through
>>> the
>>> returned values, pulling out those records which meet the domain
>>> criteria
>>> (or the reverse, do the FX find for the domain criteria, then the
>> date
>>> filtering in PHP...
>>>
>>>
>>> Couple of ideas... YMMV...
>>> Cheers
>>> Steve
>>
>>
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list