Class to handle mySQL database functions