public function query($sql)
    {
        $rows = array();
        foreach ($this->getConnection()->query($sql) as $row) {
            $rows[] = $row;
        }

        return $rows;
    }
public function query($sql)
    {
        $rows = array();
        foreach ($this->getConnection()->query($sql) as $row) {
            $rows[] = $row;
        }

        return $rows;
    }
public function query ( $ sql ) { $ rows = array ( ) ; foreach ( $ this -> getConnection ( ) -> query ( $ sql ) as $ row ) { $ rows [ ] = $ row ; } return $ rows ; }
Execute sql and expect return a data.

@param string $sql Sql query.

@return array
Execute sql and expect return a data .