Jump to content
Server Maintenance This Week. ×

Multiple value searches?


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

Recommended Posts

  • Newbies

Hi, I have a set of checkboxes in a HTML that I post to a PHP page. I can strip out the individual values. These values need to be passed to a PHP filemaker for searches?

The question is, how do I create a multiple value FIND on a single field?

$findCommand = $fm->newFindCommand('layout');

$findCommad->addFindCriterion('Field1', $value1);

$findCommad->addFindCriterion('Field1', $value2);

$result = $findCommand->execute();

$records = $result->getRecords();

The script above doesn't seemed to work as $value2 will overwrite $value1.

I also tried using CompoundFind but kept getting the error :

[color:red]Notice: Undefined property: FileMaker_Command_FindRequest_Implementation::$_omit in /Library/FileMaker Server/Web Publishing/publishing-engine/php/lib/php/FileMaker/Implementation/Command/CompoundFindImpl.php on line 27

Can anyone advise? Thanks.

Link to comment
Share on other sites

How were you doing the compound find?

Should look something like this:

$compoundFind = $fm->newComoundFindCommand('layout');

$firstFind = $fm->newFindCommand('layout');

$firstFind->addFindCriterion('Field1';$value1);

$compoundFind->add(1,$firstFind);

$secondFind = $fm->newFindCommand('layout');

$secondFind->addFindCriterion('Field1';$value2);

$compoundFind->add(2,$secondFind);

$result = $compoundFind->execute();

Link to comment
Share on other sites

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