I'm still debugging the MDB2 issue that i have. in fact, my problem comes from : if (!PEAR::loadExtension($this->phptype)) { return $this->raiseError(MDB2_ERROR_NOT_FOUND, null, null, 'extension '.$this->phptype.' is not compiled into PHP', __FUNCTION__); } from connect function located in MDB2. even if the extension php_pgsql.dll is loaded by php.ini, it seems that PEAR is not able to see it. Maybe creators of this package could track this bug or at least investigate with. Because when i control via phpinfo(), pgsql module is loaded normally... the proof is that i can use pgsql without PEAR on my web pages without problem. So i will investigate more, the PEAR::loadExtension($this->phptype) function because there is the mistake. Alain On 11/12/06, Alain Roger <raf.news@xxxxxxxxx> wrote:
Hi, I'm still wondering how are linked MDB2 class and MDB2_Driver_pgsql class. when i analyze the code of DB.php and pgsql.php, it's clear that DB.phpcheck a class based on phptype and therefore include the pgsql.php file. But i did not find something similar in MDB2.php. i would like to understand how can i do execute a query via MDB2 class on a postgreSQL DB. here is my code and for sure it does not work. the $db2->query(); is not a function from MDB2...only from MDB2_Driver_pgsql class. global $dsn; $options = array('debug' => 2, 'portability' => MDB2_PORTABILITY_ALL, ); $query = 'SELECT * from sp_u_001(\'all\')'; $db2 = & new MDB2(); $db2->connect($dsn); if (MDB2::isError($db2)) { die("Error connection : ".$db2->getMessage()."<br><br>".$res->getUserinfo()); } $res =$db2->query($query); if (MDB2::isError($res)) { die("Error connection : ".$res->getMessage()."<br><br>".$res->getUserinfo()); } -- Alain ------------------------------------ Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5
-- Alain ------------------------------------ Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5