setFetchMode

  1. drupal
    1. drupal7
Versionen
drupal7 public DatabaseStatementPrefetch::setFetchMode($fetchStyle, $a2 = NULL, $a3 = NULL)

See also

PDOStatement::setFetchMode()

Verwandte Themen

Code

includes/database/prefetch.inc, line 242

<?php
public function setFetchMode($fetchStyle, $a2 = NULL, $a3 = NULL) {
  $this->defaultFetchStyle = $fetchStyle;
  switch ($fetchStyle) {
    case PDO::FETCH_CLASS:
      $this->defaultFetchOptions['class'] = $a2;
      if ($a3) {
        $this->defaultFetchOptions['constructor_args'] = $a3;
      }
      break;
    case PDO::FETCH_COLUMN:
      $this->defaultFetchOptions['column'] = $a2;
      break;
    case PDO::FETCH_INTO:
      $this->defaultFetchOptions['object'] = $a2;
      break;
  }

  // Set the values for the next fetch.
  $this->fetchStyle = $this->defaultFetchStyle;
  $this->fetchOptions = $this->defaultFetchOptions;
}
?>

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