Updated q() not to accept SELECT, INSERT and UPDATE queries