dimanche 6 juillet 2014

Error fetching data from database and undefine index


Vote count:

0




I'm passing value 13 to processpayment.php, but the function i call does not return any value to $req_que_info.



<a href="processpayment.php?id=13"</a>


processpayment.php?id=13:



include("../include/session.php");
$queue_id=$_GET['id'];
$req_que_info = $database->getQueInfo($queue_id);
$count = count($req_que_info);
echo $req_que_info['queue_id'];
echo $count;


database.php:



function getQueInfo($queue_id){
$q = "SELECT * FROM ".TBL_QUEPAY." WHERE queue_id = ?";
$stmt = $this->connection->prepare($q);
$stmt->execute(array($queue_id));
$dbarray = $stmt->fetchAll();
return $dbarray;
}


asked 12 secs ago






Aucun commentaire:

Enregistrer un commentaire