Ejemplo n.º 1
0
 private function storeMySql($objectID, $objectOld)
 {
     if (null === $this->_db) {
         $this->_db = new \Core\DB_MySQL();
         $this->_db->connect($this->config->db->db_host, $this->config->db->db_name, $this->config->db->db_user, $this->config->db->db_password);
     }
     $sql = "INSERT INTO " . self::MYSQL_TABLE_NAME . " SET ";
     $sql .= " ActionID = '" . addslashes($this->_action) . "',";
     $sql .= " Date = '" . time() . "',";
     $sql .= " UserID = " . $this->_userID . ',';
     $sql .= " IP = '" . $this->_IP . "',";
     $sql .= " ForwardedIP = '" . $this->_ForwardedIP . "',";
     $sql .= " ObjectID = " . intval($objectID) . ",";
     $sql .= " ObjectOld = " . $objectOld . ",";
     $sql .= " Params='" . $this->_params . "'";
     try {
         $this->_db->execute($sql);
     } catch (\Exception $e) {
         throw new \Core\Exception($sql, 0, null, $this->config);
     }
 }