Welcome Guest, Not a member yet? Register   Sign In
Passing parameters from a view to a model
#1

[eluser]Unknown[/eluser]
Hi
Been using CI on and off for almost a year now. Like a lot of the features but I still find myself puzzeled quite often.

I have a loop in a view:

foreach($dada->result() as $didi):

In here I would like to make a call to a database (through the controller and model) but how do I pass the current $didi->id to the model?
(Could ofcourse just $this->db->query('SELECT * FROM dudu WHERE id = ' . $didi->id) directly but...)

endforeach;

Can anyone help?


Messages In This Thread
Passing parameters from a view to a model - by El Forum - 06-03-2008, 11:40 AM
Passing parameters from a view to a model - by El Forum - 06-03-2008, 01:56 PM
Passing parameters from a view to a model - by El Forum - 06-04-2008, 07:59 AM
Passing parameters from a view to a model - by El Forum - 06-04-2008, 09:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB