Skip to content
Advertisement

CALL multiple procedures with python

I have a linux server and I would like to run a python script every day to run mysql procedures but I do not know how to run multiple procedures and put a condition if there is an error that it sends me an email with the description of the error. Here is my script with only one procedure:

JavaScript

Thank you for your help.

Advertisement

Answer

You can use callproc method to execute MySQL procedures

JavaScript

If you want to call multiple procedures, you can put callproc in some kind of loop and use try…catch for error handling.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement