public function Sql::placeholder in Drupal 9
Same name and namespace in other branches
- 8 core/modules/views/src/Plugin/views/query/Sql.php \Drupal\views\Plugin\views\query\Sql::placeholder()
Generates a unique placeholder used in the db query.
File
- core/
modules/ views/ src/ Plugin/ views/ query/ Sql.php, line 1086
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
public function placeholder($base = 'views') {
static $placeholders = [];
if (!isset($placeholders[$base])) {
$placeholders[$base] = 0;
return ':' . $base;
}
else {
return ':' . $base . ++$placeholders[$base];
}
}