[FX.php List] Search problems

Bob Patin bob at patin.com
Tue Jul 11 22:01:21 MDT 2006


Kevin,

Why don't you set up a 2nd field, a calc field, that says, "if type =  
Fiction, then this field = YES; otherwise, it equals NO." Then you  
can do a search for that field to contain YES or NO, and it will  
always be reliable...

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com

   CONTACT US VIA INSTANT MESSAGING:
      AIM or iChat: longterm1954
      Yahoo: longterm_solutions
      MSN: tech at longtermsolutions.com
      ICQ: 159333060


On Jul 11, 2006, at 10:41 PM, 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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060711/f205ff09/attachment-0001.html


More information about the FX.php_List mailing list