當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ParseQuery::startsWith方法代碼示例

本文整理匯總了PHP中Parse\ParseQuery::startsWith方法的典型用法代碼示例。如果您正苦於以下問題:PHP ParseQuery::startsWith方法的具體用法?PHP ParseQuery::startsWith怎麽用?PHP ParseQuery::startsWith使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Parse\ParseQuery的用法示例。


在下文中一共展示了ParseQuery::startsWith方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: processFilters

 /**
  * Apply filter settings to the source
  *
  * @param array $settings
  */
 protected function processFilters(array $settings = [])
 {
     foreach ($settings['filters'] as $column => $filter) {
         switch (key($filter)) {
             case Grid\Grid::FILTER_EQ:
                 $this->source->equalTo($column, reset($filter));
                 break;
             case Grid\Grid::FILTER_LIKE:
                 $this->source->startsWith($column, reset($filter));
                 break;
             default:
                 // throw NotImplemented?
                 break;
         }
     }
 }
開發者ID:bashmach,項目名稱:bluz-skeleton-parse,代碼行數:21,代碼來源:ParseSource.php

示例2: getNumOfSleepers

function getNumOfSleepers()
{
    $query = new ParseQuery("BagTransaction");
    $query->startsWith("status", "active");
    $results = $query->find();
    $count = count($results);
    return $count;
}
開發者ID:justingil1748,項目名稱:HackBag,代碼行數:8,代碼來源:funcs.php

示例3: testQueryDataUnt

 public function testQueryDataUnt()
 {
     $department = "ACCT";
     $course = "2010";
     $section = "001";
     $obj = ParseObject::create('TestObject');
     $obj->set('department', $department);
     $obj->set('course', $course);
     $obj->set('section', $section);
     $obj->save();
     $query = new ParseQuery('TestObject');
     $query->startsWith('department', $department);
     $query->equalTo('course', $course);
     $query->startsWith('section', $section);
     $query->limit(1);
     $response = $query->find();
     $this->assertTrue(count($response) == 1);
 }
開發者ID:jmc0592,項目名稱:csce4444,代碼行數:18,代碼來源:ParseHandlerTest.php

示例4: ventasDiaTotales

 public function ventasDiaTotales($fecha)
 {
     $query = new ParseQuery("facturas");
     $query->startsWith("fecha", $fecha);
     $results = $query->find();
     $data['facturas'] = '';
     //print_r($results[0]->folio);
     foreach ($results as $record) {
         echo $record->serie . $record->folio;
     }
     $this->load->view('reportes/ventas_dia', $data);
 }
開發者ID:royergarci,項目名稱:muffin,代碼行數:12,代碼來源:Reportes.php

示例5: queryDataUnt

function queryDataUnt($department, $course, $section = "001")
{
    $query = new ParseQuery("Book");
    $query->startsWith("department", $department);
    $query->equalTo("course", $course);
    //$query->startsWith("section", $section);
    $query->limit(1);
    try {
        $result = $query->find();
        if (isset($result[0])) {
            $object = $result[0];
            $GLOBALS['isbn'] = $object->get("isbn");
            $GLOBALS['name'] = $object->get("name");
            $GLOBALS['priceNewUnt'] = $object->get("priceNew");
        }
    } catch (ParseException $ex) {
        echo "Book not found in database.";
    }
}
開發者ID:jmc0592,項目名稱:csce4444,代碼行數:19,代碼來源:getUntData.php

示例6: testStartsWith

 public function testStartsWith()
 {
     $someAscii = "\\E' !\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU" . "VWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~'";
     $prefixes = ['zax', 'start', '', ''];
     $suffixes = ['qub', '', 'end', ''];
     $this->saveObjects(4, function ($i) use($prefixes, $suffixes, $someAscii) {
         $obj = ParseObject::create("TestObject");
         $obj->set("myString", $prefixes[$i] . $someAscii . $suffixes[$i]);
         return $obj;
     });
     $query = new ParseQuery("TestObject");
     $query->startsWith("myString", $someAscii);
     $results = $query->find();
     $this->assertEquals(2, count($results), 'Did not return correct number of objects.');
 }
開發者ID:rvdavid,項目名稱:parse-php-sdk,代碼行數:15,代碼來源:ParseQueryTest.php


注:本文中的Parse\ParseQuery::startsWith方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。