Query tools using PDO