Jump to content
Server Maintenance This Week. ×

Help with creating a Find using logical or


Jalz

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

Recommended Posts

Hey all,

 

I've got the following find command statement. I need it to search on 4 fields, the first 3 being standard items, but the 4th field containing a possible of 4 different options. Any ideas how can I achieve this? Many thanks as always

 

$request = $fm->newFindCommand('Cars');
$request->addFindCriterion('Color','=='.$_POST['Color']);
$request->addFindCriterion('Distance',$_POST['Distance']);
$frequest>addFindCriterion('Age',$_POST['Age']);


$request->setLogicalOperator(FILEMAKER_FIND_OR);

$request->addFindCriterion('Type', 'Coupe');
$request->addFindCriterion('Type', 'Estate');
$frequest>addFindCriterion(''Type, 'Hatchback');
$request->addFindCriterion('Type', 'Saloon');
$requestResult = $request->execute();

 

Link to comment
Share on other sites

This topic is 4090 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.