MySql_to_json is a php class that takes mysql query and converts it into a json object.