示例#1
0
 /**
  * Test pull request #9 : omit on first request is missing
  * @covers \airmoi\FileMaker\FileMaker::newCompoundFindCommand
  */
 public function testNewCompoundFindCommandFirstOmitMissing()
 {
     $command = $this->fm->newCompoundFindCommand('sample');
     $request1 = $this->fm->newFindRequest('sample');
     $request1->addFindCriterion('id', "1");
     $request1->setOmit(true);
     $command->add(1, $request1);
     $result = $command->execute();
     $this->assertEquals(49, $result->getFoundSetCount());
 }
示例#2
0
 * Requirements:
 *   1. Working FileMaker Server installation
 *   2. 'FMPHP_Sample' database hosted in FileMaker Server
 *
 */
// Include FileMaker API
require_once "FileMaker.php";
// Create a new connection to FMPHP_Sample database.
// Location of FileMaker Server is assumed to be on the same machine,
//  thus we assume hostspec is api default of 'http://localhost' as specified
//  in filemaker-api.php.
// If FMSA web server is on another machine, specify 'hostspec' as follows:
//   $fm = new FileMaker('FMPHP_Sample', 'http://10.0.0.1');
$fm = new FileMaker('FMPHP_Sample');
// Create FileMaker_Command_CompoundFind object on layout to search
$compoundFind =& $fm->newCompoundFindCommand('Form View');
// Create first find request on layout
$findreq =& $fm->newFindRequest('Form View');
// Create second find request on layout
$findreq2 =& $fm->newFindRequest('Form View');
// Create third find request on layout
$findreq3 =& $fm->newFindRequest('Form View');
// Specify search criterion for first find request
$findreq->addFindCriterion('Quantity in Stock', '<100');
// Specify search criterion for second find request
$findreq2->addFindCriterion('Quantity in Stock', '0');
$findreq2->setOmit(true);
// Specify search criterion for third find request
$findreq3->addFindCriterion('Cover Photo Credit', 'The Dallas Morning News');
$findreq3->setOmit(true);
// Add find requests to compound find command