A php class to dynamically generate mysql queries