MySQL query fails when some other process takes some time in execution of process i call the query it fails some time. when i start query in the beginning never fails here is my model model_common
function get_where_custom($table, $column, $value) {
$this->db->where($column, $value);
$query = $this->db->get($table);
return $query;
}
//here is my controller
function _get_where($table, $query = array(), $select = "*",$limit = NULL, $offset = NULL, $order_by = 'id', $order_as = 'desc')
{
$this->load->model('model_common');
if( $this->db->conn_id->ping() == FALSE){
$this->model_common->reconnect();
}
$query = $this->model_common->get_where($table, $query, $select, $limit, $offset , $order_by, $order_as);
return $query;
}