[eluser]Thorpe Obazee[/eluser]
Code:
function getStuff( $id=false ) {
if( !$id ) {
return $this->db->query();
} else {
// made some correction on the code
return $this->db->get_where( 'stuff', array('id' => $id) );
}
I don't think I get the idea of returning of query object(I probably need to sleep.it's 1am here and I am hungry) but I'd return FALSE if I don't retrieve anything. and check from the function expecting it if it receives a boolean FALSE.