logging
This commit is contained in:
@@ -74,6 +74,10 @@ class MY_Model extends CI_Model{
|
|||||||
|
|
||||||
function get_query_result(){
|
function get_query_result(){
|
||||||
$query = $this->db->query($this->sql);
|
$query = $this->db->query($this->sql);
|
||||||
|
if($query === FALSE){
|
||||||
|
log_message('error', 'Database query failed: ' . $this->db->error()['message'] . ' | SQL: ' . $this->sql);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
if($query->num_rows()==0){
|
if($query->num_rows()==0){
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user