Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $search_results = array();
- $queries = array(
- 'Quantity in Stock' => ['term' => 0, 'omit' => FALSE],
- 'Quantity in Stock' => ['term' => '<100', 'omit' => TRUE],
- 'Quantity in Stock' => ['term' => 0, 'omit' => TRUE],
- 'Cover Photo Credit' => ['term' => 'The Dallas Morning News', 'omit' => TRUE],
- );
- $fm = new FileMaker('FMPHP_Sample');
- // Create FileMaker_Command_CompoundFind object on layout to search
- $compoundFind = $fm->newCompoundFindCommand('Form View');
- $inc = 0;
- foreach($queries as $fiel => $lookup) {
- $inc++;
- $findreq = $fm->newFindRequest('Form View');
- $findreq->addFindCriterion($field, $lookup['term']);
- $findreq->setOmit($lookup['omit']);
- $compoundFind->add($inc, $findreq);
- }
- // Set sort order
- $compoundFind->addSortRule('Title', 1, FILEMAKER_SORT_DESCEND);
- // Execute compound find command
- $result = $compoundFind->execute();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement