Jump to content


Photo

Problem with "empty" result set (MySQL) ) :(


  • Please log in to reply
2 replies to this topic

#1 CrazyIvan

CrazyIvan
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 19 June 2006 - 01:15 PM

Hey there

I was just wondering if anyone has ever encountered the problem I am having before.
I am running a sql query within my php script, which is returning an empty array. The funny thing is,
if I echo out the sql query and run it in phpmyadmin, it does infact return one row. Could anyone shed some
light on my situation?

Thanks so much, here's a summary of my code below

function blah($id, $indicator){

$sql = 'SELECT ksi_detail.value
FROM cornelius_saved_ksi_detail ksi_detail
WHERE ksi_detail.saved_ksi_id_fk = '.$id.' 
AND   ksi_detail.indicator_id_fk = '.$indicator;
                         
$this->dao->fetch($sql);            
$temp = $this->getItems();

}

function getItems{
        
$detail = array();
while ($row=$this->getItem()) 
{
    $detail[] = $row;
}
return $detail;

}


#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 19 June 2006 - 01:43 PM

A typo maybe? $getItems?

function $getItems

~ D Kuang

#3 CrazyIvan

CrazyIvan
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 19 June 2006 - 02:22 PM

Thanks for the reply! But unfortunately that typo I made when submitting this post hehe. My source is infact correct.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users