+ $this->error = '';
+
+ if($this->mysqli)
+ $result = @$this->db->query($sql);
+ else
+ $result = @mysql_query($sql,$this->db);
+
+ if($this->mysqli) {
+ if($this->db->errno)
+ $this->error = $this->db->error;
+ }
+ elseif(mysql_errno($this->db))
+ $this->error = mysql_error($this->db);
+
+ if(strlen($this->error)) {
+ logger('dba: ' . $this->error);
+ }