function SelectInterface::rightJoin
Right Outer Join against another table in the database.
Parameters
$table: The table against which to join. May be a string or another SelectQuery object. If a query object is passed, it will be used as a subselect. Unless the table name starts with the database / schema name and a dot it will be prefixed.
$alias: The alias for the table. In most cases this should be the first letter of the table, or the first letter of each "word" in the table.
$condition: The condition on which to join this table. If the join requires values, this clause should use a named placeholder and the value or values to insert should be passed in the 4th parameter. For the first table joined on a query, this value is ignored as the first table is taken as the base table. The token %alias can be used in this string to be replaced with the actual alias. This is useful when $alias is modified by the database system, for example, when joining the same table more than once.
$arguments: An array of arguments to replace into the $condition of this join.
Return value
The unique alias that was assigned for this table.
Deprecated
in drupal:8.1.0 and is removed from drupal:9.0.0. Instead, change the query to use leftJoin(). For instance: $injected_connection->query('A')->rightJoin('B') is identical to $injected_connection->query('B')->leftJoin('A'). This functionality has been deprecated because SQLite does not support it.
See also
https://www.drupal.org/node/2765249
2 methods override SelectInterface::rightJoin()
- Select::rightJoin in core/
lib/ Drupal/ Core/ Database/ Query/ Select.php - Right Outer Join against another table in the database.
- SelectExtender::rightJoin in core/
lib/ Drupal/ Core/ Database/ Query/ SelectExtender.php - Right Outer Join against another table in the database.
File
-
core/
lib/ Drupal/ Core/ Database/ Query/ SelectInterface.php, line 360
Class
- SelectInterface
- Interface definition for a Select Query object.
Namespace
Drupal\Core\Database\QueryCode
public function rightJoin($table, $alias = NULL, $condition = NULL, $arguments = []);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.