Jump to content


Empty result set problem :(

  • Please log in to reply
1 reply to this topic

#1 CrazyIvan

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 19 June 2006 - 01:06 PM

Hey there

I was just wondering if anyone has ever encountered the problem I am having.
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;
$temp = $this->getItems();


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


#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 20 June 2006 - 01:29 PM

Which array is empty? Where's the echo line? I don't see any return values from the blah() function which is also never called.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users