Methods

Creates a new JOIN statement for a table.

__construct(mixed $table, string $type) 

Optionally, the type of JOIN can be specified as the second parameter.

Parameters

$table

mixed

column name or array($column, $alias) or object

$type

string

type of JOIN: INNER, RIGHT, LEFT, etc

Adds a new AND condition for joining.

and_on(mixed $c1, string $op, mixed $c2) : \Fuel\Core\Database_Query_Builder_Join

fluent This method is part of a fluent interface and will return the same instance

Parameters

$c1

mixed

column name or array($column, $alias) or object

$op

string

logic operator

$c2

mixed

column name or array($column, $alias) or object

Returns

Compile the SQL partial for a JOIN statement and return it.

compile(mixed $db) : string

Parameters

$db

mixed

Database_Connection instance or instance name

Returns

string

Adds a new AND condition for joining.

on(mixed $c1, string $op, mixed $c2) : \Fuel\Core\Database_Query_Builder_Join

fluent This method is part of a fluent interface and will return the same instance

Parameters

$c1

mixed

column name or array($column, $alias) or object

$op

string

logic operator

$c2

mixed

column name or array($column, $alias) or object

Returns

Adds a closing bracket.

on_close() : \Fuel\Core\Database_Query_Builder_Join

fluent This method is part of a fluent interface and will return the same instance

Returns

Adds a opening bracket.

on_open() : \Fuel\Core\Database_Query_Builder_Join

fluent This method is part of a fluent interface and will return the same instance

Returns

Adds a new OR condition for joining.

or_on(mixed $c1, string $op, mixed $c2) : \Fuel\Core\Database_Query_Builder_Join

fluent This method is part of a fluent interface and will return the same instance

Parameters

$c1

mixed

column name or array($column, $alias) or object

$op

string

logic operator

$c2

mixed

column name or array($column, $alias) or object

Returns

Resets the join values.

reset() : \Fuel\Core\Database_Query_Builder_Join

fluent This method is part of a fluent interface and will return the same instance

Returns

 Properties

 

<p>join table alias</p>

$_alias : string

 

<p>ON clauses</p>

$_on : array

 

<p>join table</p>

$_table : string

 

<p>join type</p>

$_type : string