Page 1 of 1

mdb2 pear executeStoredProc didnot return a resultset

Posted: Mon Jan 04, 2010 7:58 am
by realkzeal
Can somebody help me with these php code, I been working with this problem for weeks it cannot return result

Code: Select all

<?php
require_once("MDB2.php");
 
Class RetrieveDataManager
{
private $db;
 
public function __Construct()
{
$dsn = array ('phptype' =>'mysqli', 'hostpec' =>'localhost:3306', 'username'=>'root', 'password'=>'admin', 'database'=>'realkzeal', 'client_flags'=>65536);
$this->db =& MDB2::factory($dsn, true);
if (PEAR::isError($this->db))
trigger_error($this->db->getMessage().$this->db->getUserinfo());
 
$this->db->loadModule('Function');
}
 
function getCityByName($cityName)
{
$quoteCityName =
$queryString =array( $this->db->quote($cityName));
$getCityName = $this->db->executeStoredProc('RKzeal_GetCityByName', $queryString);
while($theCityName = $getCityName->fetchRow(MDB2_FETCHMODE_ASSOC ))
{
echo $theCityName['City']."\n";
}
if(PEAR::isError($getCityName))
trigger_error($getCityName->getUserinfo());
 
print_r($theCityName['City']);
}
}
 
$myCity = new RetrieveDataManager();
$myCity ->getCityByName('Idumota');
?>