Permalink
Browse files

ENHANCEMENT Use simplier query syntax for SS3 ORM

  • Loading branch information...
1 parent 6e30463 commit 8152ddce8ccc8b1afb974d7a8104f1848be1b12e @halkyon halkyon committed May 3, 2012
Showing with 2 additions and 12 deletions.
  1. +2 −12 code/PostgreSQLDatabase.php
@@ -2024,22 +2024,12 @@ public function numRecords() {
}
public function nextRecord() {
- // Coalesce rather than replace common fields.
- if($data = pg_fetch_row($this->handle)) {
- foreach($data as $columnIdx => $value) {
- $columnName = pg_field_name($this->handle, $columnIdx);
- // $value || !$ouput[$columnName] means that the *last* occurring value is shown
- // !$ouput[$columnName] means that the *first* occurring value is shown
- if(isset($value) || !isset($output[$columnName])) {
- $output[$columnName] = $value;
- }
- }
- return $output;
+ if($data = pg_fetch_assoc($this->handle)) {
+ return $data;
} else {
return false;
}
}
-
}

0 comments on commit 8152ddc

Please sign in to comment.