本文整理匯總了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>