I would like to validate unique fields in database at form submission by catching mysql_errno() instead of using the is_unique function. Can anyone help how can I do this.
Please provide details like if mysql returns error, I should be able to display the error on the form, just like other validation errors or is_unique error.
Thanks

How to catch mysql_error() or mysql_errno()
Started by tabarry, 30 January 2013 - 13:12 PM
- Single Page
Posted 30 January 2013 - 13:12 PM
Posted 31 January 2013 - 00:27 AM
I think you need to extend the default grocery_crud model and there check for any errors you want.
Check here: http://www.grocerycr...tions/set_model
Check here: http://www.grocerycr...tions/set_model