joinCondition() 공개 메소드

WHERE constrains used for the ON clause of a (LEFT/RIGHT/INNER/CROSS) JOIN.
public joinCondition ( ) : NilPortugues\Sql\QueryBuilder\Syntax\Where
리턴 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];
 }