db_query_temporary

  1. drupal
    1. drupal6 database.mysql.inc
    2. drupal6 database.mysqli.inc
    3. drupal6 database.pgsql.inc
    4. drupal7
Versionen
drupal6 db_query_temporary($query)
drupal7 db_query_temporary($query, $args, $options = array())

Execute a query string against the active database and save the result set to a temp table.

Übergabeparameter

$query The prepared statement query to run. Although it will accept both named and unnamed placeholders, named placeholders are strongly preferred as they are more self-documenting.

$args An array of values to substitute into the query. If the query uses named placeholders, this is an associative array in any order. If the query uses unnamed placeholders (?), this is an indexed array and the order must match the order of placeholders in the query string.

$options An array of options to control how the query operates.

Rückgabewert

The name of the temporary table.

See also

DatabaseConnection::defaultOptions()

Verwandte Themen

▾ 2 functions call db_query_temporary()

DatabaseTemporaryQueryTestCase::testTemporaryQuery in modules/simpletest/tests/database_test.test
Confirm that temporary tables work and are limited to one request.
database_test_db_query_temporary in modules/simpletest/tests/database_test.module
Run a db_query_temporary and output the table name and its number of rows.

Code

includes/database/database.inc, line 1832

<?php
function db_query_temporary($query, $args, $options = array()) {
  if (!is_array($args)) {
    $args = func_get_args();
    array_shift($args);
  }
  list($query, $args, $options) = _db_query_process_args($query, $args, $options);

  return Database::getConnection($options['target'])->queryTemporary($query, $args, $options);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen