select

  1. drupal
    1. drupal7
Versionen
drupal7 public DatabaseConnection::select($table, $alias = NULL, array $options = array())

Prepare and return a SELECT query object with the specified ID.

Übergabeparameter

$table The base table for this query, that is, the first table in the FROM clause. This table will also be used as the "base" table for query_alter hook implementations.

$alias The alias of the base table of this query.

$options An array of options on the query.

Rückgabewert

A new SelectQuery object.

See also

SelectQuery

Verwandte Themen

Code

includes/database/database.inc, line 676

<?php
public function select($table, $alias = NULL, array $options = array()) {
  if (empty($this->selectClass)) {
    $this->selectClass = 'SelectQuery_' . $this->driver();
    if (!class_exists($this->selectClass)) {
      $this->selectClass = 'SelectQuery';
    }
  }
  $class = $this->selectClass;
  // new is documented as the highest precedence operator so this will
  // create a class named $class and pass the arguments into the constructor,
  // instead of calling a function named $class with the arguments listed and
  // then creating using the return value as the class name.
  return new $class($table, $alias, $this, $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