本文整理汇总了PHP中FileMaker::newCompoundFindCommand方法的典型用法代码示例。如果您正苦于以下问题:PHP FileMaker::newCompoundFindCommand方法的具体用法?PHP FileMaker::newCompoundFindCommand怎么用?PHP FileMaker::newCompoundFindCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileMaker
的用法示例。
在下文中一共展示了FileMaker::newCompoundFindCommand方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testNewCompoundFindCommandFirstOmitMissing
/**
* 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: FileMaker
* 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