| Versionen | |
|---|---|
| drupal7 | public DatabaseStatementPrefetch::fetchAllKeyed($key_index = 0, $value_index = 1) |
includes/
<?php
public function fetchAllKeyed($key_index = 0, $value_index = 1) {
if (!isset($this->columnNames[$key_index]) || !isset($this->columnNames[$value_index])) {
return array();
}
$key = $this->columnNames[$key_index];
$value = $this->columnNames[$value_index];
$result = array();
// Traverse the array as PHP would have done.
while (isset($this->currentRow)) {
$result[$this->currentRow[$key]] = $this->currentRow[$value];
$this->next();
}
return $result;
}
?>
Kommentare
Kommentar hinzufügen