Grab mysql queries