[FX.php List] New FX features: My $0.02US

Chris Hansen chris at iViking.org
Tue May 31 18:37:26 MDT 2005


Interesting idea.  My biggest concern is that removing this top level 
of the array would also remove the 'errorCode' element, which I feel is 
pretty important.  Of course, an FX error object would still be 
returned in the event of an internal error, and perhaps I could set up 
the behavior of this function to return an FX error object if FileMaker 
returned an error.  I'd like some good feedback on this.  Personally, 
I'd feel more inclined to leave this level of the array, but in this 
case leave only 'data', 'errorCode', and 'foundCount'.  PHP parses the 
entire XML page no matter what, so this would mostly save a bit of 
memory, and reduce array complexity.  What do other list members think?

--Chris Hansen
   creator of FX.php
   "The best way from FileMaker to the Web."
   www.iViking.org

On May 31, 2005, at 5:20 PM, Krauss Bill wrote:

> I was thinking about that and almost put it in my request, but then
> remembered you can already do a regular "FMFind()" request with the
> $returnDataSet parameter set to "false" to get the count.
>
>     	$result_set = $query->FMFind();
>
> 	$count = $result_set['foundCount'];
>
> And if FMFindData() is implemented, you could always use the PHP 
> count()
> function on the returned dataset to get the number of records:
>
> 	$data_set = $query->FMFindData();
>
> 	$record_count = count($data_set);
>
> Getting the count this way would still be a two-step process this way,
> but I think I prefer it, because what I like about the FMFindData() 
> idea
> is that it removes one of the levels of the multi-level array. I think
> adding foundcount would necessarily put that level back in.
>
>
> bill
> 	
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Steve Winter
> Sent: Tuesday, May 31, 2005 4:04 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] New FX features: My $0.02US
>
> Bill,
>
> This sounds like a very good suggestion to me, the only thing that I'd
> like to see, in addition to the actual data, is the foundcount returned
> with that data set...
>
> Cheers
> Steve
>
>
>> Here's a request for something that might also streamline things a
> bit,
>> but on the other side of the array.
>>
>> Most of the time I don't need the full set of information contained
>> returned by FMFind(). All I really need is the record values. For
>> example, many (if not most) of my scripts contain some variation of
> the
>> following:
>>
>> 	// do the query
>>    	$result_set = $query->FMFind();
>>
>> 	// pull the data
>> 	$data_set = $result_set['data'];
>>
>> So, a query that just returned the data would cut down on processing
>> and
>> memory usage. I wouldn't propose changing the structure of the
> FMFind()
>> function -- but perhaps you could add a new one called FMFindData()
>> that
>> doesn't return all the "extra" metadata? This could be considered be
>> the
>> flipside of the $returnDataSet parameter.
>>
>> Regards,
>>
>> Bill Krauss
>>
>> -----Original Message-----
>> From: fx.php_list-bounces at mail.iviking.org
>> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Chris
> Hansen
>> Sent: Tuesday, May 31, 2005 2:37 PM
>> To: FX.php Discussion List
>> Subject: Re: [FX.php List] Feature Request
>>
>> The new functionality won't work exactly as Gjermund suggested.  As I
>> said, this was already in the works, so I had my own ideas on how to
>> implement it.  The way that I think that this would most often be
>> implemented would be as an _optional_ fourth parameter when creating
> an
>> FX object, like this:
>>
>> $myQuery = new FX('192.168.1.9', 80, 'FMPro7', false);
>>
>> That last 'false' says, in essence, "we won't be using that last layer
>
>> of the array."  How does that sound to everyone?  I should note that
>> 'true' (unquoted) is the default value, both for legacy purposes, and
>> because of how FileMaker works.  Of course if people really want to,
>> they can change this by tweaking FX.php.
>>
>> Best,
>>
>> --Chris Hansen
>>    creator of FX.php
>>    "The best way from FileMaker to the Web."
>>    www.iViking.org
>>
>> On May 31, 2005, at 7:50 AM, Michael Layne wrote:
>>
>>> Not exactly sure how it will work based on example below, but that
>>> would be GREAT.  On occasion, I have a solution with both MySQL and
>>> FM7SA, and when doing any PHP OTHER than FM, you of course don't use
>
>>> the "[0]".  would be one less thing to keep up with.
>>>
>>> Thanks!  Hopefully it will be clear how to add the
>>> parameter/functionality.
>>>
>>> Michael
>>>
>>>
>>> On May 31, 2005, at 2:58 AM, Chris Hansen wrote:
>>>
>>>> Yep, this was already in the works.  The default behavior is still
>>>> the same, but can be changed via an optional fourth parameter of
> the
>>>> FX constructor function, or via a new function added for the
>> purpose.
>>
>>>>  If anyone has thoughts or suggestions about this, let me know.
>>>> Thanks!
>>>>
>>>> --Chris Hansen
>>>>   creator of FX.php
>>>>   "The best way from FileMaker to the Web."
>>>>   www.iViking.org
>>>>
>>>> On May 30, 2005, at 7:45 AM, Gjermund Gusland Thorsen wrote:
>>>>
>>>>
>>>>> $omptimizeLiveWithoutRepetitions = True; //False;
>>>>>
>>>>> To avoid the [0] on $value[0]
>>>>>
>>>>> [0] is only 3 characters, but multiplied with number of fields and
>
>>>>> foundCount,
>>>>> this is alot of redundant RAM usage on a server with some traffic.
>>>>>
>>>>> Gjermund
>>>>> _______________________________________________
>>>>> 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
>>>
>>
>> _______________________________________________
>> 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
> _______________________________________________
> 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