Modified query.php to allow null parameters.