Welcome Guest, Not a member yet? Register   Sign In
Attention Expert users: What are the things you wish you knew about CI when you started?
#20

[eluser]al042077[/eluser]
I see the comments about "muck with data in the model."

How do you handle dynamic items such as search parameters? Do you put:
Code:
if(!empty($this->input->post('myname'))
{
    $this->db->where('name', $this->input->post('myname'))
}
in the controller or in the model? On one hand, I'd say model as it's dealing with data. On the other hand, I'd say controller because it's receiving input from post and processing it appropriately.


Messages In This Thread
Attention Expert users: What are the things you wish you knew about CI when you started? - by El Forum - 08-12-2010, 11:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB