public function session_write($session_id, $session_data)
    {
        // set the garbage collection timestamp
        $time = (int)time() + (int)$this->_session_life_time;
        // bzip the data
        // replace the whole session_data
        $session_id   = mysql_real_escape_string($session_id, $this->db->db);
        $session_data = mysql_real_escape_string($session_data);
        $date         = date('Y-m-d H:i:s');

        $sql = (string)"REPLACE INTO `{$this->_db_name}`.`user_session` (`session_id`,`session_data`,`expires`, `created`, `updated`) VALUES ('$session_id','$session_data', $time , '$date', '$date')";
        if (!$this->db->query($sql)) return false;

        $this->session_id = (string)$session_id;

        return true;
    }