how to catch database errors in model |
If you have db_debug set in your database config, you won't really get a chance to catch the errors.
$this->db->_error_message() only works in CI2. CI3 does include an error() method in the db class to get the most recent error, if any have occurred: http://www.codeigniter.com/user_guide/da...ing-errors So, you would do something like this: PHP Code: public function deal_citys($deal_id) |
Messages In This Thread |
how to catch database errors in model - by mrajesh369 - 06-11-2015, 03:15 AM
RE: how to catch database errors in model - by mwhitney - 06-11-2015, 11:52 AM
|