[FX.php List] question about returned result array
DC
dan.cynosure at dbmscan.com
Mon Mar 19 13:54:39 MDT 2007
look at:
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
%22 is the url encoding for double-quotes.
for some reason your search parameter has them. sometimes FX.php will
add them if your search is specified with an 'eq' param.
HTH,
dan
Alex Gates had written:
> 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
>
More information about the FX.php_List
mailing list