joinCondition() public method

WHERE constrains used for the ON clause of a (LEFT/RIGHT/INNER/CROSS) JOIN.
public joinCondition ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
return NilPortugues\Sql\QueryBuilder\Syntax\Where
示例#1
0
 /**
  * @param Select $select
  * @param string $selfColumn
  * @param string $refColumn
  *
  * @return Select
  */
 public function addJoin(Select $select, $selfColumn, $refColumn)
 {
     $select->isJoin(true);
     $table = $select->getTable()->getName();
     if (!isset($this->joins[$table])) {
         $newColumn = array($selfColumn);
         $select->joinCondition()->equals($refColumn, SyntaxFactory::createColumn($newColumn, $this->select->getTable()));
         $this->joins[$table] = $select;
     }
     return $this->joins[$table];
 }