Jump to content

This topic is 7156 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

I'd like to find a set of records using omit. I can't find an answer in my copy of FX.php in 8 Hours or in the forum. I know how to search a field by a value, how do I find omitted records with that value? Is there a published list of operators used by FX.php?

Here's my code:

$Instance = new FX($serverIP,$webCompanionPort);

$Instance->SetDBData('Database.fp7','Layout');

$Instance->SetDBPassword('user','pass');

$Instance->AddDBParam('FieldName',"FieldValue",$op="eq");

$Instance Result=$Instance->FMFind();

Thanks!

Shannon

-=-=-

Posted

Okay, I found an answer that works for me...

I replaced

$Instance->AddDBParam('FieldName',"FieldValue",$op="eq");

with

$Instance->AddDBParam('FieldName',"FieldValue",$op="neq");

The 8 Hours book incorrectly shows the code to be

$Instance->AddDBParam('FieldName',"FieldValue",$-op="eq");

and it didn't offer other operators. I found a list of operators in the FX.php source code (FX>FX.php) with $op="bw" being the default (begins with):)

case 'eq':

$currentSearch .= $name . " = '" . $value . "'";

break;

case 'neq':

$currentSearch .= $name . " != '" . $value . "'";

break;

case 'cn':

$currentSearch .= $name . " LIKE '%" . $value . "%'";

break;

case 'bw':

$currentSearch .= $name . " LIKE '" . $value . "%'";

break;

case 'ew':

$currentSearch .= $name . " LIKE '%" . $value . "'";

break;

case 'gt':

$currentSearch .= $name . " > '" . $value . "'";

break;

case 'gte':

$currentSearch .= $name . " >= '" . $value . "'";

break;

case 'lt':

$currentSearch .= $name . " < '" . $value . "'";

break;

case 'lte':

$currentSearch .= $name . " <= '" . $value . "'";

break;

Hope this helps...

Shannon

-=-=-

This topic is 7156 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.