mdb2 pear executeStoredProc didnot return a resultset

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
realkzeal
Forum Newbie
Posts: 3
Joined: Mon Oct 26, 2009 5:50 am

mdb2 pear executeStoredProc didnot return a resultset

Post 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');
?>
Post Reply