function q($sql)
 {
     $debugsql = "select debugmysql from web where id='" . WEB_ID . "'";
     $data1 = new DbResult(mysql_query($debugsql, $this->connection));
     $data = $data1->fetch_row();
     if ($data[0]) {
         $GLOBALS["debug"] .= 'DEBUGIN INFO<br />' . $sql . '<br />';
     }
     if (!($res = @mysql_query($sql, $this->connection))) {
         $this->errorMsg = 'Query failed: ' . mysql_error($this->connection) . ' SQL: ' . $sql;
     }
     if ($res) {
         return $res;
     } else {
         return null;
     }
 }