fix the api.php for mysql