Update query.php

made it faster!