本文整理汇总了PHP中SelectQuery::andWhere方法的典型用法代码示例。如果您正苦于以下问题:PHP SelectQuery::andWhere方法的具体用法?PHP SelectQuery::andWhere怎么用?PHP SelectQuery::andWhere使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SelectQuery
的用法示例。
在下文中一共展示了SelectQuery::andWhere方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: joinHelperTable
/**
* @return SelectQuery
**/
protected function joinHelperTable(SelectQuery $query)
{
$uc = $this->container;
if (!$query->hasJoinedTable($uc->getHelperTable())) {
$query->join($uc->getHelperTable(), Expression::eq(new DBField($uc->getParentTableIdField(), $uc->getDao()->getTable()), new DBField($uc->getChildIdField(), $uc->getHelperTable())));
}
return $query->andWhere(Expression::eq(new DBField($uc->getParentIdField(), $uc->getHelperTable()), new DBValue($uc->getParentObject()->getId())));
}
示例2: targetize
/**
* @return SelectQuery
**/
protected function targetize(SelectQuery $query)
{
return $query->andWhere(Expression::eqId(new DBField($this->container->getParentIdField(), $this->container->getDao()->getTable()), $this->container->getParentObject()));
}
示例3: fillSelectQuery
/**
* @return SelectQuery
**/
public function fillSelectQuery(SelectQuery $query)
{
$query->limit($this->limit, $this->offset);
if ($this->distinct) {
$query->distinct();
}
if ($this->logic->getSize()) {
$query->andWhere($this->logic->toMapped($this->checkAndGetDao(), $query));
}
if ($this->order) {
$query->setOrderChain($this->order->toMapped($this->checkAndGetDao(), $query));
}
if ($this->projection->isEmpty() && $this->strategy->getId() != FetchStrategy::CASCADE) {
$this->joinProperties($query, $this->checkAndGetDao(), $this->checkAndGetDao()->getTable(), true);
}
return $query;
}