[FX.php List] Multiple find requests

DC dan.cynosure at dbmscan.com
Fri Jan 21 13:46:58 MST 2005


Seems like my message didn't get through 3 days ago.... apologies if 
this is a duplicate as I can't see it in my archives and the list has 
been having problems....

This sounds like it might be easier to just write your custom function
in PHP. There are many, many array functions which could be combined to
duplicate 'two logical operator' search on FX returned arrays. I would
just dump out the simple find from FX and then operate on that array
(tranforming it and searching it to complete the OR search).

Or you could just do two separate find requests (to FMP and then use PHP
to merge them. As in: FIND#1: program_name = 'Math 101' AND advisor_1 =
'John Doe' FIND#2: program_name = 'Math 101' AND advisor_1 = 'Jane
Smith' Then, massage the FX arrays and merge.

It seems like overkill to set up and maintain an ODBC connection for a
single problem like this when PHP has so many useful tools.

look at:
array_walk() - walk each array element through a custom call back that
contains your OR search. This is probably the most straightforward.
array_search() & array_merge() - do two searches and merge the results.
array_flip() (look in comments for array_transpose() function that can
make it easier to work with FX.php resultset).

HTH,
dan



Dennis Crall had written:
> This has been a popular question recently. One I am facing myself. I believe
> the answer is that you can not use the XML interface to query the database
> using two logical operators.
> 
> Now, I am wondering if anyone has used an ODBC connection in PHP to connect
> to FileMaker. We're considering a hybrid solution where the site is
> primarily driven by FX except for the one query that needs multiple
> operators.
> 
> Is this feasible? What ODBC Driver Manager are you using with the PHP?
> 
> Any help is appreciated. Thank you,
> 
> Dennis Crall
> ITS-Academic Technologies
> University of Iowa
> 
> 
> On 1/18/05 12:34 PM, "Kevin Drennan" <kevin at santafe.edu> wrote:
> 
> 
>>I need to do a query that contains both a logical AND and a logical OR.
>>Is it possible to do multiple find requests in FX like you can when
>>you're in find mode in Filemaker via the Requests -> Add new request
>>menu item? To paraphrase the query I'm looking for all records in my
>>table where program_name = 'Math 101' AND advisor_1 = 'John Doe' OR
>>advisor_2 = 'Jane Smith'
>>
>>Any advice would be much appreciated.
>>
>>Thanks,
>>Kevin
>>
>>_______________________________________________
>>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
> 



More information about the FX.php_List mailing list