当前位置: 首页>>代码示例>>PHP>>正文


PHP FileMaker::newFindAllCommand方法代码示例

本文整理汇总了PHP中FileMaker::newFindAllCommand方法的典型用法代码示例。如果您正苦于以下问题:PHP FileMaker::newFindAllCommand方法的具体用法?PHP FileMaker::newFindAllCommand怎么用?PHP FileMaker::newFindAllCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileMaker的用法示例。


在下文中一共展示了FileMaker::newFindAllCommand方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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('CAROSEL_online_13001');
// Create FileMaker_Command_Find on layout to search
$findCommand =& $fm->newFindAllCommand('CAROSEL_online_13001');
// Sort records in descending 'Title' order
$findCommand->addSortRule('Title', 1, FILEMAKER_SORT_ASCEND);
// Execute find command
$result = $findCommand->execute();
if (FileMaker::isError($result)) {
    echo "Error: " . $result->getMessage() . "\n";
    exit;
}
// Get array of found records
$records = $result->getRecords();
// Print out found records
// Setup row count variable to alternate row background color
$row = 0;
foreach ($records as $record) {
    // if $row is odd, set class of <tr> to alt-row-color
开发者ID:GSAPP-visualresources,项目名称:conf,代码行数:31,代码来源:displayRecords.php

示例2: FileMaker

    // configure a connection to FileMaker Server Advanced
    $contactsListConnection = new FileMaker('Contacts.fp7', $serverIP . ':' . $webCompanionPort, $webUN, $webPW);
    // set database and layout information
    $contactsListQuery = $contactsListConnection->newFindCommand('web_list');
    // add find parameters
    foreach ($searchRecordsArray as $fieldName => $fieldValue) {
        $contactsListQuery->addFindCriterion($fieldName, $fieldValue);
    }
    // retrieve the records in this database matching the specified parameters available to the current user
    $contactsObject = $contactsListQuery->execute();
} else {
    // otherwise, find all records
    // configure a connection to FileMaker Server Advanced
    $contactsListConnection = new FileMaker('Contacts.fp7', $serverIP . ':' . $webCompanionPort, $webUN, $webPW);
    // create a new findall query
    $contactsListQuery = $contactsListConnection->newFindAllCommand('web_list');
    // perform query
    $contactsObject = $contactsListQuery->execute();
}
$fuzzyData = new FX_Fuzzy_Debugger($contactsListConnection, $contactsObject);
?>
<html>
    <head>
        <title>FX Error Tester</title>
    </head>
    <body>
        <h1>Contact List</h1>
        <table border="1">
            <tr>
                <th>First Name</th>
                <th>Last Name</th>
开发者ID:SmartPCGuy,项目名称:fxphp,代码行数:31,代码来源:fx_tester_fap.php

示例3: testNewFindAllCommand

 /**
  * @covers \airmoi\FileMaker\FileMaker::newFindAllCommand
  * @SuppressWarnings(PHPMD.Superglobals)
  */
 public function testNewFindAllCommand()
 {
     $command = $this->fm->newFindAllCommand('sample');
     if (!$GLOBALS['OFFICIAL_API']) {
         $this->assertInstanceOf(Command\FindAll::class, $command);
     } else {
         $this->assertInstanceOf(\FileMaker_Command_FindAll::class, $command);
     }
     $result = $command->execute();
     if (!$GLOBALS['OFFICIAL_API']) {
         $this->assertInstanceOf(Object\Result::class, $result);
     } else {
         $this->assertInstanceOf(\FileMaker_Result::class, $result);
     }
     $this->assertEquals(50, $result->getFoundSetCount());
 }
开发者ID:airmoi,项目名称:filemaker,代码行数:20,代码来源:FileMakerTest.php


注:本文中的FileMaker::newFindAllCommand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。