[eluser]absurdparadox[/eluser]
Strange issue going on here. I've got one query thats giving me 0 results in CodeIgniter, and 1 result in pgAdmin (postgresql).
Here's the php:
Code:
function pageinfo($page, $subpage){
$arrReturn = array();
$arrReturn['page']=$this->db->select('*')->from('tblcategory')->where('urlkeyword',$page)->get();
$parentid=$arrReturn['page']->row()->id;
$arrReturn['subpage']=$this->db->select('*')->from('tblcategory')->where('urlkeyword',$subpage)->where('parentid',$parentid)->get();
echo $this->db->last_query();
return $arrReturn;
}
The first query works fine. Second query returns no results.
The query being returned from the last_query() echo:
Code:
SELECT * FROM "tblcategory" WHERE "urlkeyword" = 'test1' AND "parentid" = '0baaf830-68bb-11dd-ad8b-0800200c9a66'
Pasting this exact query into pgadmin, it gives me a result. How is this possible...? Maybe I am simply doing something wrong here?