sqlite - PHP SQLite3 Catch All Errors -
i trying ways catch sqlite3 errors in php? have tried many , seem work. consider code below, enough catch errors? can suggest else?
$result = $stmt->execute(); if ($this->db->lasterrorcode()){ throw new databaseerror($this->db->lasterrormsg(), $this->db->lasterrorcode()); } else { return $this->db->changes(); }
i think enough because there's error code when error raised of course must work.
Comments
Post a Comment