Ademir Lima Tue Aug 21 14:19:25 -0400 2012

Subject: new adpter for firebird

Hi, i be start with php-activerecord and try add a new adapter to firebird and founded a prob:


Fatal error: Call to a member function fetch() on a non-object in /home/adell/www/cappellus/lib/php-activerecord/lib/Connection.php on line 256 

when i set to mysql or other this work fine, but i set to firebird no. If i coment the block above in Connection.php, all work:


    public function columns($table)
    {
        $columns = array();
        $sth = $this->query_column_info($table);

               //If comment this loop
              /*
        while (($row = $sth->fetch())) {
            $c = $this->create_column($row);
            $columns[$c->name] = $c;
        }
               */
        //all work
        return $columns;
    }

what is my mistake? Should I create or overload this function?


Sven Walter Tue Nov 27 03:26:16 -0500 2012

hey, i needed a firebird adapter and had a look at your implementation on github. in query_column_info and query_for_tables methods you have to return $this->query($sql) and not the sql as string!

(1-1/1)