function views_plugin_query_default::placeholder

Generates a unique placeholder used in the db query.

File

plugins/views_plugin_query_default.inc, line 1121

Class

views_plugin_query_default
Object used to create a SELECT query.

Code

public function placeholder($base = 'views') {
    static $placeholders = array();
    if (!isset($placeholders[$base])) {
        $placeholders[$base] = 0;
        return ':' . $base;
    }
    else {
        return ':' . $base . ++$placeholders[$base];
    }
}