[FX.php List] question about returned result array

Alex Gates alex at gandrpublishing.com
Mon Mar 19 16:41:42 MDT 2007


Hi Tom -

It turns out the %22s had nothing to do with the problem -
I downloaded the latest version of fx.php and the problem is gone.

I had been fighting this for a while - and my hacky fix involved making 
a text field with a calculated result that equaled my number field.

I'm glad that I don't have to mess around with that any more - lesson 
learned- keep everything updated.


Tom Sepper wrote:
> While I can't explain the why, I may be able to help provide a solution.
> 
> Have you tried stripping that %22 using ereg? 
> 
> 
> ---
> Tom Sepper
> Director of Information Technology
> Director's Choice Tour & Travel
> 
> P 806.762.6354
> F 806.763.7637
> 
> tsepper at directorschoice.travel
> http://www.directorschoicetourandtravel.com
> 
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Alex Gates
> Sent: Monday, March 19, 2007 2:34 PM
> To: 'FX.php Discussion List'
> Subject: [FX.php List] question about returned result array
> 
> Hi everyone - 
> 
> In my "beginning" days of using fx.php, I encountered a problem querying
> a database with a number and a number field.
> For some reason, once I changed the field in filemaker to "text" type,
> my finds would work.
> 
> I'm still experiencing this, but instead of changing it to a "text"
> type, I thought I would investigate a little further.
> 
> I did a print_r($lookupResult); 
> This is my returned array:
> 
> Array
> (
>     [data] => Array
>         (
>         )
> 
>     [linkNext] => 
>     [linkPrevious] => 
>     [foundCount] => 0
>     [fields] => Array
>         (
>         )
> 
>     [URL] => http://loginandaddress/fmi/xml/FMPXMLRESULT.xml?-db=Web_
> Dev2.fp7&-lay=Web+Data+Table&-max=50&web_account_number.op=eq&web_accoun
> t_number=%2215029%22&-find
>     [query] => 
>     [errorCode] => 401
>     [valueLists] => Array
>         (
>         )
> 
> )
> 
> 
> This is my query:
> 
> $lookup=new FX($serverIP,$webCompanionPort,'FMPro7');
> 	$lookup->SetDBData('Web_ Dev2.fp7','Web Data Table');
> 	$lookup->SetDBPassword('xxxx','xxxx');
> 	
> $lookup->AddDBParam('web_account_number','"'.$_SESSION['webaccountnumber
> '].'"', 'eq');
> 	$lookupResult=$lookup->FMFind(); 
> 	$foundResult=$lookupResult['foundCount'];
> 
> 
> I noticed that my URL in my lookupResult is looking for
> &web_account_number=%2215029%22
> 
> As you can see in my query, I'm using a session variable
> 'webaccountnumber' which is actually 15029.
> 
> Could the %22 on both ends be causing the problem?  I imagine that it
> would.
> 
> I'm using <meta http-equiv="Content-Type" content="text/html;
> charset=UTF-8" />
> 
> Have any of you seen the %22 before??  What could be causing this?  Or,
> is this nothing to worry about?
> 
> Interestingly, I paste 
> 
> http://loginandaddress/fmi/xml/FMPXMLRESULT.xml?-db=Web_Cookbook_Dev2.fp
> 7&-lay=Web+Data+Table&-max=50&web_account_number.op=eq&web_account_numbe
> r=%2215029%22&-find
> 
> (with the %22s)
> 
> in my browser and see the xml - I have no error code - it finds the
> record fine - 
> 
> but I can also paste
> 
> http://loginandaddress/fmi/xml/FMPXMLRESULT.xml?-db=Web_Cookbook_Dev2.fp
> 7&-lay=Web+Data+Table&-max=50&web_account_number.op=eq&web_account_numbe
> r=15029&-find
> 
> (WITHOUT the %22s)
> 
> and it also works - with no problem.
> 
> 
> Both ways work fine to display the XML in my browser, but I can't seem
> to get it to go with fx.php
> 
> Any ideas?
> 
> 
> _______________________________________________
> 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