public function Query($Sql, $Parameters = NULL) {
		$Db = Gdn::Database();

		// Replace db prefixes.
		$Sql = str_replace(array(':_z', ':_'), array($Db->DatabasePrefix.self::TABLE_PREFIX, $Db->DatabasePrefix), $Sql);

      // Figure out the type of the type of the query.
      if (StringBeginsWith($Sql, 'select'))
         $Type = 'select';
      elseif (StringBeginsWith($Sql, 'truncate'))
         $Type = 'truncate';
      elseif (StringBeginsWith($Sql, 'insert'))
         $Type = 'insert';
      elseif (StringBeginsWith($Sql, 'update'))
         $Type = 'update';
      elseif (StringBeginsWith($Sql, 'delete'))
         $Type = 'delete';
      else
         $Type = 'select';

		// Execute the query.
      if (is_array($Parameters))
         $this->SQL->NamedParameters($Parameters);

		$Result = $this->SQL->Query($Sql, $Type);

		//$this->Timer->Split('Sql: '. str_replace("\n", "\n     ", $Sql));

		return $Result;
	}