PEAR DB, Smarty, dsn pgsql, mysql problem.
Posted: Tue Nov 02, 2004 1:43 am
Help me in figuring out the problem mentioned below
file name: smartdb.php
Filename: ModNews.php
I have initialised the object of smartDB in this file
Filename: index.php
I have included
DB.php
smartDB.php
config.php
etc in this file.
the problem is when I use mysql there is no error
and when I use pgsql there is an error saying undefined function fetchRow()
file name: smartdb.php
Code: Select all
<?
class smartDB extends DB
{
var $ooResult;
var $ooRowz;
var $ooContainer;
function smartDB()
{
$this->ooResult = NULL
$this->ooRowz = NULL
$this->ooContainer = array();
}
function getMatrix( $dbQuery)
{
global $dbHndl;
$this->ooResult = $dbHndl->query($dbQuery);
while($this->ooRows = $this->ooResult->fetchRow())
{
array_push($this->oocontainer, $this->Rows);
}
return $this->ooContainer;
}
function setMatrix($matrixName, $Matrix)
{
global $smartyObj;
$smartyObj->assign($matrixname, $Matrix);
}
}
?>I have initialised the object of smartDB in this file
Filename: index.php
I have included
DB.php
smartDB.php
config.php
etc in this file.
the problem is when I use mysql there is no error
and when I use pgsql there is an error saying undefined function fetchRow()