Welcome Guest, Not a member yet? Register   Sign In
me failing with $query->result()
#4

[eluser]the_namdeeW[/eluser]
I would do...

IN YOUR CONTROLLER:
foreach ($query as $row)
{
$data['somefield'] = $row->somefield;
}
$this->load->view('some_view', $data);

IN YOUR VIEW:
<?=$somefield?>

This will gather all your data from your loop attaching it to $data[]. Then you just echo it out where ever seems fit.

Cheers.


Messages In This Thread
me failing with $query->result() - by El Forum - 05-07-2009, 08:08 AM
me failing with $query->result() - by El Forum - 05-07-2009, 08:13 AM
me failing with $query->result() - by El Forum - 05-07-2009, 08:15 AM
me failing with $query->result() - by El Forum - 05-07-2009, 10:08 AM
me failing with $query->result() - by El Forum - 05-07-2009, 10:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB