MySQL Forums
Forum List  »  Connector/Python

Re: Getting the output parameter after calling a stored procedure!
Posted by: Ernest Bonat
Date: March 11, 2014 01:53PM

Hi Geert,

This is what I was looking for. It’ll be nice if the provided examples show a more clear code line by line. This will reduce the amount of the questions to be answered in the forum.

The following is in the guide:

>>> args = (5, 5, 0)
>>> cursor.callproc('multiply', args)
('5', '5', 25L)

Will be nice we have this example code:

>>> args = (5, 5, 0)
>>> result = cursor.callproc('multiply', args)
>>> print(result)
('5', '5', 25L)

If you want to get the result only, you should code:

>>> print(result[2])
25L

Thank you very much for all your help!

Ernest Bonat, Ph.D.

Options: ReplyQuote


Subject
Written By
Posted
Re: Getting the output parameter after calling a stored procedure!
March 11, 2014 01:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.