本文整理汇总了PHP中QQCondition::EqualTables方法的典型用法代码示例。如果您正苦于以下问题:PHP QQCondition::EqualTables方法的具体用法?PHP QQCondition::EqualTables怎么用?PHP QQCondition::EqualTables使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQCondition
的用法示例。
在下文中一共展示了QQCondition::EqualTables方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Join
/**
* Join the node to the query. Join condition here gets applied to parent item.
*
* @param QQueryBuilder $objBuilder
* @param bool $blnExpandSelection
* @param QQCondition|null $objJoinCondition
* @param QQSelect|null $objSelect
* @throws Exception
* @throws QCallerException
*/
public function Join(QQueryBuilder $objBuilder, $blnExpandSelection = false, QQCondition $objJoinCondition = null, QQSelect $objSelect = null)
{
$objParentNode = $this->objParentNode;
$objParentNode->Join($objBuilder, $blnExpandSelection, null, $objSelect);
if ($objJoinCondition && !$objJoinCondition->EqualTables($this->FullAlias())) {
throw new QCallerException("The join condition on the \"" . $this->strTableName . "\" table must only contain conditions for that table.");
}
try {
$strParentAlias = $objParentNode->FullAlias();
$strAlias = $this->FullAlias();
//$strJoinTableAlias = $strParentAlias . '__' . ($this->strAlias ? $this->strAlias : $this->strName);
$objBuilder->AddJoinItem($this->strTableName, $strAlias, $strParentAlias, $objParentNode->_PrimaryKey, $this->strPrimaryKey, $objJoinCondition);
if ($blnExpandSelection) {
$this->PutSelectFields($objBuilder, $strAlias, $objSelect);
}
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}