Welcome Guest, Not a member yet? Register   Sign In
Need an advice about form validation
#5

[eluser]ang89[/eluser]
[quote author="alboyd" date="1251111714"]Isn't querying the trans_status or whatever you said causing the same "overhead" than checking up front and not doing the trans_status query?

And wouldn't it make more sense to stay within the validation loop by using a callback function than exiting the loop, receiving an error and trying to find a way back in?[/quote]

Hi alboyd. This trans_status() thing that I talked about is the one defined in CI's DB library. It doesn't perform queries. It only checks whether the recent database transaction performed successfully or not, it is pretty light.

However, forget about this post. Now I realized that my question is pretty stupid. Off course the first one makes more sense. I can't judge that a record is already exists just because the DB insertion query is failed. Like that's the only reason why it would failed.


Messages In This Thread
Need an advice about form validation - by El Forum - 08-23-2009, 07:59 PM
Need an advice about form validation - by El Forum - 08-23-2009, 11:09 PM
Need an advice about form validation - by El Forum - 08-23-2009, 11:59 PM
Need an advice about form validation - by El Forum - 08-24-2009, 12:01 AM
Need an advice about form validation - by El Forum - 08-24-2009, 01:02 AM
Need an advice about form validation - by El Forum - 08-24-2009, 04:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB