Welcome Guest, Not a member yet? Register   Sign In
When to use models and helpers?
#1

[eluser]ryan656[/eluser]
I have a helper file with a 'checkUser' function for login purposes - it takes a username and password, checks the database for a match and sets session information if they were found. Someone told me yesterday that I should not put any data queries inside helper functions. Should this function be in a model or should just the query call be in a model or what?

Does every function that performs CRUD on a database belong in a model? And is it the whole function or just the part that performs the query?

Thanks,
Ryan


Messages In This Thread
When to use models and helpers? - by El Forum - 12-06-2009, 05:05 PM
When to use models and helpers? - by El Forum - 12-06-2009, 05:19 PM
When to use models and helpers? - by El Forum - 12-06-2009, 05:36 PM
When to use models and helpers? - by El Forum - 12-06-2009, 05:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB