[FX.php List] AND plus OR search

Head Honcho headhoncho at customikesolutions.com
Tue Dec 8 19:30:16 MST 2009


Hi all,

It's been a while since I did FX.php.. .but the API for PHP copes well  
with this with it's compoundFind().

Works in a "FileMaker" way... treating each 'find' as a new request.

Just my 2c worth.

On 09/12/2009, at 10:52 AM, Gjermund Gusland Thorsen wrote:

> Whatever you do, do not forget about
> http://php.net/manual/en/function.array-merge-recursive.php
>
> as you might want to combine the two results.
>
> ggt
>
> 2009/12/8 Anders Monsen <andersm at alamark.com>:
>> Hi Steve,
>> That's what I feared.
>> A second query does seem to be acceptable.
>> Thanks,
>> Anders
>> On Dec 8, 2009, at 2:09 PM, Steve Winter wrote:
>>
>> Hi Anders,
>> Short answer: No
>> Long anser: No...!
>> Well, there is a slightly longer answer...
>> What you need to do is figure out which query will return the  
>> smallest set
>> of results, then use PHP to do the second aspect of the query. In  
>> pseduo
>> code...
>> Assuming that a search for B = Y OR C = X will return the smallest  
>> found
>> set;
>> foreach($result)
>> if(A = X)
>> do something
>> Alternatively, if A = X returns the smallest found set, then you  
>> need to;
>> foreach($result)
>> if(B = Y OR C = X)
>> do that thing
>> Hope this helps...
>> Cheers
>> Steve
>>
>> On 8 Dec 2009, at 20:04, Anders Monsen wrote:
>>
>> I think my mysql background is clouding my FX attempts...
>>
>> Is it possible to search for something where the conditions are as  
>> follows:
>>
>> where field A contains value 'X'
>> and
>>
>> field B contains value 'Y'
>> or
>> field C contains value 'X'
>>
>> I believe a pure OR search would find across A or B or C having the  
>> values,
>> but I want to have field A and then one of the other two fields.
>>
>> --
>> Thanks,
>> Anders Monsen
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>> Steve Winter
>> steve at bluecrocodile.co.nz
>> m: +44 77 7852 4776
>> 3 Calshot Court, Channel Way
>> Ocean Village, Southampton SO14 3GR
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

Regards

Michael Ward
--
Head Honcho
CustoMike Solutions
Member, FileMaker Business Alliance
Member, FileMaker Technical Network
FileMaker 7 Certified Developer
FileMaker 8 Certified Developer
FileMaker 9 Certified Developer
FileMaker 10 Certified Developer
10 Wandoo Crt
Wheelers Hill, 3150
ph 0414 562 501
headhoncho at customikesolutions.com






More information about the FX.php_List mailing list