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

[eluser]iamsen47[/eluser]
I rewrote it again and now it displays all the rows with the APPN value.

I still don't know what I got wrong or right though.

Code:
function get_tickets2()
{
  $sql = "SELECT ref_code, ref_desc FROM prob_ref WHERE tab_code = ?";
  $q = $this->db->query($sql, array('APPN'));
  
  if($q->num_rows() > 0)
  {
   foreach($q->result() as $row)
   {
    $data[] = $row;
   }
   return $data;
  }
}

Code:
<?php foreach ($rows as $r): ?>

&lt;?php echo $r->ref_code; ?&gt;<br>
&lt;?php echo $r->ref_desc; ?&gt;<br>

&lt;?php endforeach; ?&gt;


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