/** Performs a query, and returns the result set. The result set should be freed when finished. */ protected static function query($SQL) { clsDB::initialize(); $SQL = clsDB::doFullReplace($SQL); clsDB::$arrQueries[] = $SQL; $RST = mysql_query($SQL, clsDB::$conDB); if (!$RST) { throw new Exception("MySQL Error: " . mysql_error(clsDB::$conDB) . ": {$SQL}"); } return $RST; }