phprs\ezsql\impls\JoinImpl::join PHP Method

join() public static method

public static join ( $context, $type, $table )
    public static function join($context, $type, $table)
    {
        if ($type) {
            $context->appendSql("{$type} JOIN {$table}");
        } else {
            $context->appendSql("JOIN {$table}");
        }
    }

Usage Example

Example #1
0
 /**
  * innerJoin('table1')->on('table0.id=table1.id') => "INNER JOIN table1 ON table0.id=table1.id"
  * @param string $table
  * @return \phprs\ezsql\rules\select\JoinOnRule
  */
 public function innerJoin($table)
 {
     JoinImpl::join($this->context, 'INNER', $table);
     return new JoinOnRule($this->context);
 }
JoinImpl