예제 #1
0
 /**
  * Executes an sql statement and returns the results as an array
  *
  * @param string $query Query to execute.
  */
 public function get_rows($query)
 {
     Collector::StartQuery($query);
     $res = pg_query($this->connection, $query);
     Collector::EndQuery($query);
     return pg_fetch_all($res);
 }
예제 #2
0
 /**
  * Executes an sql statement and returns the results as an array
  *
  * @param string $query Query to execute.
  */
 public function get_rows($query)
 {
     Collector::StartQuery($query);
     $res = $this->connection->query($query);
     Collector::EndQuery($query);
     while ($r = $res->fetchArray()) {
         $result[] = $r;
     }
     return $result;
 }