I will write a PHP file, that will communicate to your MySQL Database. It may or may not take Input parameters as per your requirement. I will give Output in JSON Format. This API Webservice will be reusable at different places in your APP or Website