Welcome Guest, Not a member yet? Register   Sign In
General model questions
#1

[eluser]jimps[/eluser]
Hi,

I'm just wondering how you people returns information to the controller from the model when dealing with methods that can return many kinds of "errors".

For example, let's say that I'm building an account model. I have one method for registration and in this I'm validating all the POST-data and inserting it to the database. On success I return TRUE and on failure I return a json encoded array (for the AJAX).

So my question is if this is "right" or could i do it some way better?

Sorry for my damn poor english.

/Jimps


Messages In This Thread
General model questions - by El Forum - 06-28-2010, 01:58 PM
General model questions - by El Forum - 06-28-2010, 03:05 PM
General model questions - by El Forum - 06-28-2010, 03:12 PM
General model questions - by El Forum - 06-28-2010, 03:27 PM
General model questions - by El Forum - 06-28-2010, 03:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB