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


PHP FileMaker::newFindCommand方法代码示例

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


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

示例1: testNewFindCommand

 /**
  * @covers \airmoi\FileMaker\FileMaker::newFindCommand
  */
 public function testNewFindCommand()
 {
     $command = $this->fm->newFindCommand('sample');
     if (!$GLOBALS['OFFICIAL_API']) {
         $this->assertInstanceOf(Command\Find::class, $command);
     } else {
         $this->assertInstanceOf(\FileMaker_Command_Find::class, $command);
     }
     $command->addFindCriterion('id', FileMaker::FIND_GT . '25');
     $result = $command->execute();
     if (!$GLOBALS['OFFICIAL_API']) {
         $this->assertInstanceOf(Object\Result::class, $result);
     } else {
         $this->assertInstanceOf(\FileMaker_Result::class, $result);
     }
     $this->assertEquals(25, $result->getFoundSetCount());
 }
开发者ID:airmoi,项目名称:filemaker,代码行数:20,代码来源:FileMakerTest.php

示例2: array

require_once '../server_data.php';
require_once 'FileMaker.php';
require_once '../FX_Fuzzy_Debugger.php';
if (DEBUG_FUZZY) {
    $messageType = 'Fuzzy';
} else {
    $messageType = 'F.A.P.';
}
if (isset($_POST['find_records'])) {
    // a search is only preformed if the form was submitted
    // by placing the form values in an array, we can loop to set all of our find criteria
    $searchRecordsArray = array('First_Namer' => $_POST['fname'], 'Last_Name' => $_POST['lname'], 'Phone_1 ' => $_POST['phone']);
    // 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();
}
开发者ID:SmartPCGuy,项目名称:fxphp,代码行数:31,代码来源:fx_tester_fap.php

示例3: FileMaker

    <!-- <script src="scripts/array.js"></script> -->

    <?php 
define('FM_HOST', '127.0.0.1');
define('FM_FILE', 'sportsdev');
define('FM_USER', 'sifatsultan');
define('FM_PASS', 'pizzahut20');
# this is the include for the API for PHP
require_once 'FileMaker.php';
# instantiate a new FileMaker object
$sportslogin = new FileMaker(FM_FILE, FM_HOST, FM_USER, FM_PASS);
/***********************************
   QUERY PLAYER STATS AVGMETRESPERCARRY
   ************************************/
//find 'Tplayers2'
$personnel_find = $sportslogin->newFindCommand('Tplayers2');
//build query array
$personnel_findCriterions = array('fteam_name' => 'Waratahs');
foreach ($personnel_findCriterions as $key => $value) {
    $personnel_find->AddFindCriterion($key, $value);
}
//[doubt]
// fmsSetPage($personnel_result,'Tplayers2',3);
//sort data by 'avg metres per carry'
$personnel_find->addSortRule('R_avgmetrespercarry', 1, FILEMAKER_SORT_DESCEND);
//execute query
$personnel_result = $personnel_find->execute();
// if(FileMaker::isError($personnel_result)){
//     // fmsTrapError($personnel_result,"error.php");
//     echo "Error";
// }
开发者ID:sifatsultan,项目名称:sifatsultan.github.io,代码行数:31,代码来源:index.php

示例4: FileMaker

<pre>
<?php 
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//require_once 'db.php';
require_once 'vendor/FileMaker.php';
$fm_file = 'TestingMaddox';
$fm_host = '54.246.190.236';
$fm_user = 'maddox.web';
$fm_pass = 'Orange624';
$layout_name = 'a.webXML';
$fm = new FileMaker($fm_file, $fm_host, $fm_user, $fm_pass);
//$cmd = $fm->newAddCommand($layout_name);
$email = "jakub.gwiazdowski@hotmail.com";
$findCommand = $fm->newFindCommand($layout_name);
$findCommand->addFindCriterion("email", "==" . $email);
$result = $findCommand->execute();
//var_dump($result);
//
//$cmd->setField("nameTitle", "Mr");
//$cmd->setField("nameFirst", "Jacob");
//$cmd->setField("nameSurname", "Gwiazdowski");
//$cmd->setField("email", "jacob@itransact.co.uk");
//$cmd->setField("telephoneLandHome", "01223308040");
//$cmd->setField("fKeyCampaign", "431");
//$cmd->setField("fKeyOpener", "280");
//$cmd->setField("subscriptionStatus", "1");
//
//
//
开发者ID:jgwiazdowski,项目名称:FMcallback,代码行数:31,代码来源:searchFM.php


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