Added mySQL functions