[FX.php List] Search problems

Jonathan Schwartz jonathan at eschwartz.com
Tue Jul 11 22:01:07 MDT 2006


Kevin,

The results you are seeing appear to due to the way FMP 7/8 deal with 
word separators (such as hyphens), as opposed to FMP 6.

I duplicated the same results you got, but using just native FMP 6 
and FMP 8.  FMP 8 sees "non-fiction" as two words.  Thus a search for 
"fiction" will return results for both "fiction" and "non-fiction".

This time...it's not fx.php.  ;-)

HTH,

Jonathan




At 1:41 PM +1000 7/12/06, Kevin Futter wrote:
>Hi all,
>
>I'm moving some more simple databases from v6 to v8, and have come across
>another problem. The db conversion went fine, and after the traumas of my
>first go-round, web access is also fine.
>
>However, one of my searches is now returning unreliable results. I've got a
>book database which I query for either fiction or non-fiction titles via a
>GET request, using the same page template to display the results. The
>relevant code looks something like this:
>
>$type = $_GET['type'];
>$groupSize = 10;
>$FMQuery = new FX($serverIP, $webCompanionPort, "FMPro7");
>$FMQuery->SetDBData("Library_Books.fp7", "web", $groupSize);
>$FMQuery->AddDBParam("Category", $type, "eq");
>$FMQuery->AddSortParam("Date", "descend");
>$ReturnedData = $FMQuery->FMFind();
>
>The problem is that if $type == "Non-Fiction", the results are OK; if $type
>== "Fiction", it returns a mix of fiction and non-fiction results, even
>though I'm forcing "eq" for the operator. Has this syntax changed since
>version 6? Is the fact that Non-Fiction contains a hyphen a problem? (I'm
>sure it worked fine with v6, though it's possible that it had this issue
>then too and I just never noticed it.)
>
>Anyway, all help greatly appreciated!
>
>--
>Kevin Futter
>Webmaster, St. Bernard's College
>http://www.sbc.melb.catholic.edu.au/
>
>
>
>------------------------------------------
>This e-mail and any attachments may be confidential.  You must not 
>disclose or use the information in this e-mail if you are not the 
>intended recipient.  If you have received this e-mail in error, 
>please notify us immediately and delete the e-mail and all copies. 
>The College does not guarantee that this e-mail is virus or error 
>free.  The attached files are provided and may only be used on the 
>basis that the user assumes all responsibility for any loss, damage 
>or consequence resulting directly or indirectly from the use of the 
>attached files, whether caused by the negligence of the sender or 
>not.  The content and opinions in this e-mail are not necessarily 
>those of the College.
>
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 

Jonathan Schwartz
Schwartz & Company
817 Marin Drive
Mill Valley, CA 94941
Phone: 415-381-1852
jonathan at eschwartz.com - http://www.eschwartz.com



More information about the FX.php_List mailing list