function Sql::placeholder in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 1001 - Contains \Drupal\views\Plugin\views\query\Sql.
Class
- Sql
- Views query plugin for an SQL query.
Namespace
Drupal\views\Plugin\views\queryCode
function placeholder($base = 'views') {
static $placeholders = array();
if (!isset($placeholders[$base])) {
$placeholders[$base] = 0;
return ':' . $base;
}
else {
return ':' . $base . ++$placeholders[$base];
}
}