[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): ?>
<?php echo $r->ref_code; ?><br>
<?php echo $r->ref_desc; ?><br>
<?php endforeach; ?>