db = $db; $this->prefix_code = $prefix_code; $this->prefix_value = $prefix_value; } function query($sql) { $rst = $this->db->query($this->prefix_code ? str_replace($this->prefix_code, $this->prefix_value, $sql) : $sql); if($rst) return $rst; throw new Exception(" [erreur] sql : erreur dans une requete"); } function insert_id() { return $this->db->insert_id(); } function fetch_assoc($rst) { return $this->db->fetch_assoc($rst); } function free_result($rst) { return $this->db->free_result($rst); } function close() { return $this->db->close(); } } ?>