当前位置: 首页>>代码示例>>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;未经允许,请勿转载。