[eluser]InsiteFX[/eluser]
You should always check to make sure you retrive data from a query!
Code:
public function get_all()
{
$query = $this->db->query('SELECT * FROM stock_categories');
if ($query->num_rows() > 0)
{
return $query->result();
}
else // you have an error - no records returned!
{
echo 'ERROR!';
return FALSE;
}
}
InsiteFX