| @@ 17-24 (lines=8) @@ | ||
| 14 | $this->stdQuery($_query); |
|
| 15 | return $this->stdQuery("SELECT lastval()"); |
|
| 16 | } |
|
| 17 | public function queryFetch( $_query ) { |
|
| 18 | $result = $this->stdQuery($_query); |
|
| 19 | $rows = []; |
|
| 20 | while($row = pg_fetch_assoc($result)) |
|
| 21 | $rows[] = $row; |
|
| 22 | pg_free_result($result); |
|
| 23 | return $rows; |
|
| 24 | } |
|
| 25 | public function queryArray( $_query ) { |
|
| 26 | $result = $this->stdQuery($_query); |
|
| 27 | $rows = []; |
|
| @@ 25-32 (lines=8) @@ | ||
| 22 | pg_free_result($result); |
|
| 23 | return $rows; |
|
| 24 | } |
|
| 25 | public function queryArray( $_query ) { |
|
| 26 | $result = $this->stdQuery($_query); |
|
| 27 | $rows = []; |
|
| 28 | while($row = pg_fetch_array($result)) |
|
| 29 | $rows[] = $row; |
|
| 30 | pg_free_result($result); |
|
| 31 | return $rows; |
|
| 32 | } |
|
| 33 | protected function stdQuery( $_query ) { |
|
| 34 | $database = $this->connection; |
|
| 35 | $error = "Error query [$_query]"; |
|