本文整理汇总了PHP中Condition::GT方法的典型用法代码示例。如果您正苦于以下问题:PHP Condition::GT方法的具体用法?PHP Condition::GT怎么用?PHP Condition::GT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Condition
的用法示例。
在下文中一共展示了Condition::GT方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: queryAction
public function queryAction()
{
$q = new Query();
$q->addAggregation(SelectAggregation::AGTN_DISTINTC, 'p', 'nombre')->addFrom('hello_world_persona', 'p')->setCondition(Condition::GT('p', "edad", 25));
$pm = PersistentManager::getInstance();
$result = $pm->findByQuery($q);
return $this->renderString(print_r($result, true));
}
示例2: Query
<pre>
<?php
include_once "core.db.criteria2.Condition.class.php";
include_once "core.db.criteria2.ComplexCondition.class.php";
include_once "core.db.criteria2.CompareCondition.class.php";
include_once "core.db.criteria2.BinaryInfixCondition.class.php";
include_once "core.db.criteria2.UnaryPrefixCondition.class.php";
include_once "core.db.criteria2.Query.class.php";
include_once "core.db.criteria2.Select.class.php";
include_once "../core.db.DatabaseMySQL.class.php";
$q = new Query();
$q->addFrom('Persona', 'p')->addFrom('Empleado', 'e')->setCondition(Condition::_AND()->add(Condition::EQ('p', "nombre", "Carlos"))->add(Condition::GT('p', "edad", 5))->add(Condition::EQA('p', "nombre", 'p', "nombre2")));
$db = new DatabaseMySQL();
echo $db->evaluateQuery($q);
//echo Condition::EQ("per", "nombre", "Carlox")->evaluate();
//echo Condition::EQA("per", "nombre", "per", "nombre2")->evaluate();
/*
$sel = new Select();
$sel->addProjection("per", "name");
$sel->addProjection("per", "age");
$sel->addAvg("per", "age");
echo $sel->evaluate();
*/
$q = new Query();
$q->addAggregation(SelectAggregation::AGTN_DISTINTC, 'datos', 'nombre')->addFrom('Persona', 'datos')->setCondition(Condition::GT('p', "edad", 5));
echo $db->evaluateQuery($q);
?>
</pre>