[FX.php List] RE: Mixed search requests
DC
dan.cynosure at dbmscan.com
Wed Oct 25 14:57:52 MDT 2006
also, instead of just print_r() on the FX array, do this:
echo '<pre>';
print_r($fx_returned_array);
echo '</pre>';
your crossed eyes will uncross.
dan
On Oct 25, 2006, at 4:54 PM, Chris Hansen wrote:
> Chris,
>
> A few thoughts to simplify things in terms of that array:
>
> 1) Look at DoFXAction() in the FX function docs. It's similar to
> FMFind(), FMEdit(), etc. but by default returns a collapsed version
> of the array (minus the top and bottom levels...)
>
> 2) There are parameters to collapse the top and bottom levels of
> the array in FMFind() and the other old functions. That trailing
> [0] in the older functions is only there so that repeating fields
> and portals can be easily handled, but most fields are neither of
> those.
>
> 3) In the FX.php distribution there's a tool called the fxparser by
> Lance Hallberg. It rocks. The point of this tool is precisely to
> help folks understand what's going on in that array.
>
> Hope some of this is of help, at least insofar as understanding the
> arrays. Best,
>
> --Chris Hansen
> FileMaker 7 Certified Developer
> Creator of FX.php
> "The best way from FileMaker to the Web."
> www.iViking.org
>
>
> On Oct 25, 2006, at 2:24 PM, Chris Bisgard wrote:
>
>>
>> Dale,
>>
>> Thanks so much. I wondered if that might be the way to go.
>> Unfortunately, my PHP knowledge is ramping up simultaneously with my
>> FileMaker knowledge, so I'm struggling with working directly with
>> arrays
>> returned by FX. It seems to be an array of nested arrays (a
>> print_r of
>> the data leaves me crosseyed!) and I'm not sure how to pull out
>> records
>> from this array based on the remaining search criteria. Do you
>> know of
>> any good PHP resources/tutorials on this? Or can you suggest a PHP
>> function to start with? I've been reading about working with
>> arrays on
>> php.net and in my O'Reilly manual, but I'm a little lost as far as
>> applying these functions to FX query data.
>>
>> Thank you again for helping yet another newbie.
>>
>> Chris
>>
>>
>>
>>> Date: Wed, 25 Oct 2006 15:04:55 -0500
>>> From: Dale Bengston <dbengston at preservationstudio.com>
>>> Subject: Re: [FX.php List] Mixed search requests
>>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>>> Message-ID:
>>> <801AEEEC-9F20-4C81-9125-87A45373D04F at preservationstudio.com>
>>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>>>
>>> Hi Chris,
>>>
>>> Whenever possible, I let PHP do the heavy lifting. As long as your
>>> initial found set (based on one criterion) is not a million records,
>>> it might be easier to walk the array looking for matches to
>>> the other
>>> criteria. I'd query FMP with the criterion that will start you out
>>> with the smallest record pool, and start from there.
>>>
>>> Dale
>>>
>>
>> _______________________________________________
>> 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