Welcome Guest, Not a member yet? Register   Sign In
DB reconnect failed
#1

(This post was last modified: 12-26-2015, 12:26 AM by imwwp.)

I'm writing a data monitor script work with CLI this week,
Code:
$this->load->database();

#####################################
running 10mins, and local ip changed.
#####################################

// need re-connnect database
$this->db->reconnect();

var_dump($this->db->conn_id)

// bool(false);

$this->db->select('name')->where_in('id', $array)->get('table')->result_array();

// Severity: error --> Exception: Call to a member function real_escape_string() on boolean path\system\database\drivers\mysqli\mysqli_driver.php 344

OK, it's looks like the re-connect was failed.

Why does this error occur? How to deal with it?
Reply


Messages In This Thread
DB reconnect failed - by imwwp - 12-25-2015, 11:24 PM
RE: DB reconnect failed - by imwwp - 12-26-2015, 01:18 AM
RE: DB reconnect failed - by mwhitney - 12-29-2015, 11:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB