Welcome Guest, Not a member yet? Register   Sign In
result_array() turns nothing but 'array' text.
#10

[eluser]NeoArc[/eluser]
Try this, if no data is found you wont get errors in the view.

Code:
function get_tickets2()
{
   $data = array(); //default value

  $sql = "SELECT ref_code, ref_desc FROM prob_ref WHERE tab_code = ?";
  $q = $this->db->query($sql, array('APPN'));
  if($q->num_rows())
  {
    $data = $q->result();  
  }
  return $data;
}


Messages In This Thread
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 02:31 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 02:48 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 02:52 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:19 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:32 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:39 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 03:43 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 04:33 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 06:00 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 07:49 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 09:23 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 09:51 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 09:57 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 10:00 AM
result_array() turns nothing but 'array' text. - by El Forum - 08-29-2012, 11:42 AM



Theme © iAndrew 2016 - Forum software by © MyBB