本文整理汇总了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;
}
}
}
示例2: getNumOfSleepers
function getNumOfSleepers()
{
$query = new ParseQuery("BagTransaction");
$query->startsWith("status", "active");
$results = $query->find();
$count = count($results);
return $count;
}
示例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);
}
示例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);
}
示例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.";
}
}
示例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.');
}