[FX.php List] Search problems

Joel Shapiro jsfmp at earthlink.net
Tue Jul 11 22:09:39 MDT 2006


Hi Kevin

One thing you could do would be to hard-code an extra $FMQuery line  
for when $type == 'fiction', e.g.:

if ( $type == 'fiction' )
{
	$FMQuery->AddDBParam("Category", 'non-fiction', "neq");
}

Alternatively, you should also be able to keep your current search  
but then only display the data when category ==  'fiction' (still  
when $type == 'fiction').  I think the first idea is probably easier  
to manage, though.

HTH

-Joel


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



More information about the FX.php_List mailing list