XOOPS
2.6.0
|
Public Member Functions | |
deletePrefix ($delete=null, $alias=null) | |
fromPrefix ($from, $alias=null) | |
innerJoinPrefix ($fromAlias, $join, $alias, $condition=null) | |
insertPrefix ($insert=null) | |
joinPrefix ($fromAlias, $join, $alias, $condition=null) | |
leftJoinPrefix ($fromAlias, $join, $alias, $condition=null) | |
rightJoinPrefix ($fromAlias, $join, $alias, $condition=null) | |
updatePrefix ($update=null, $alias=null) | |
Definition at line 31 of file QueryBuilder.php.
Xoops\Core\Database\QueryBuilder::deletePrefix | ( | $delete = null , |
|
$alias = null |
|||
) |
Turns the query being built into a bulk delete query that ranges over a certain table.
$qb = $conn->createQueryBuilder() ->delete('users', 'u') ->where('u.id = :user_id'); ->setParameter(':user_id', 1);
string | $delete | The table whose rows are subject to the deletion. Adds table prefix to table. |
string | $alias | The table alias used in the constructed query. |
Definition at line 51 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::fromPrefix | ( | $from, | |
$alias = null |
|||
) |
Create and add a query root corresponding to the table identified by the given alias, forming a cartesian product with any existing query roots.
$qb = $conn->createQueryBuilder() ->select('u.id') ->from('users', 'u')
string | $from | The table. Adds table prefix to table. |
string | null | $alias | The alias of the table. |
Definition at line 121 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::innerJoinPrefix | ( | $fromAlias, | |
$join, | |||
$alias, | |||
$condition = null |
|||
) |
Creates and adds a join to the query.
$qb = $conn->createQueryBuilder() ->select('u.name') ->from('users', 'u') ->innerJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1');
string | $fromAlias | The alias that points to a from clause |
string | $join | The table name to join. Adds table prefix to table. |
string | $alias | The alias of the join table |
string | $condition | The condition for the join |
Definition at line 168 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::insertPrefix | ( | $insert = null | ) |
Turns the query being built into an insert query that inserts into a certain table
$qb = $conn->createQueryBuilder() ->insert('users') ->values( array( 'name' => '?', 'password' => '?' ) );
string | $insert | The table into which the rows should be inserted. Adds table prefix to table. |
Definition at line 100 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::joinPrefix | ( | $fromAlias, | |
$join, | |||
$alias, | |||
$condition = null |
|||
) |
Creates and adds a join to the query.
$qb = $conn->createQueryBuilder() ->select('u.name') ->from('users', 'u') ->join('u', 'phonenumbers', 'p', 'p.is_primary = 1');
string | $fromAlias | The alias that points to a from clause |
string | $join | The table name to join. Adds table prefix to table. |
string | $alias | The alias of the join table |
string | $condition | The condition for the join |
Definition at line 144 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::leftJoinPrefix | ( | $fromAlias, | |
$join, | |||
$alias, | |||
$condition = null |
|||
) |
Creates and adds a left join to the query.
$qb = $conn->createQueryBuilder() ->select('u.name') ->from('users', 'u') ->leftJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1');
string | $fromAlias | The alias that points to a from clause |
string | $join | The table name to join. Adds table prefix to table. |
string | $alias | The alias of the join table |
string | $condition | The condition for the join |
Definition at line 191 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::rightJoinPrefix | ( | $fromAlias, | |
$join, | |||
$alias, | |||
$condition = null |
|||
) |
Creates and adds a right join to the query.
$qb = $conn->createQueryBuilder() ->select('u.name') ->from('users', 'u') ->rightJoin('u', 'phonenumbers', 'p', 'p.is_primary = 1');
string | $fromAlias | The alias that points to a from clause |
string | $join | The table name to join. Adds table prefix to table. |
string | $alias | The alias of the join table |
string | $condition | The condition for the join |
Definition at line 214 of file QueryBuilder.php.
References Xoops\Core\Database\Connection\prefix().
Xoops\Core\Database\QueryBuilder::updatePrefix | ( | $update = null , |
|
$alias = null |
|||
) |
Turns the query being built into a bulk update query that ranges over a certain table
$qb = $conn->createQueryBuilder() ->update('users', 'u') ->set('u.password', md5('password')) ->where('u.id = ?');
string | $update | The table whose rows are subject to the update. Adds table prefix to table. |
string | $alias | The table alias used in the constructed query. |
Definition at line 74 of file QueryBuilder.php.
References $update, and Xoops\Core\Database\Connection\prefix().