6
I have a database on mysql
which contains a table with several expressions. I can extract the expressions through a procedure
, solve them, but when I want to return the value of the calculation to the bank with another procedure
, this value is not saved. Follow the code below:
# mysql = MySQLdb.connect(host = "localhost", user = "client", passwd = "123456", db = "sist_dist")
mysql = MySQLdb.connect('192.168.252.30','client','123456','sist_dist')
mysql_cursor = mysql.cursor()
mysql_cursor.execute("call retira_exp('mangaba')")
linha_expressao = mysql_cursor.fetchone()
if linha_expressao=="":
sys.exit()
expressao_banco = linha_expressao[1]
id_expressao = linha_expressao[0]
resultado = eval(expressao_banco)
print resultado
mysql_cursor = mysql.cursor()
mysql_cursor.execute("CALL entrega_res('id_expressao','resultado')")
@mgibsonbr you can help?
– fernando Januario de azevedo
Fernando, I don’t think he gets any notification, he needs to interact with the question to make it happen. Only then do you use the
@
.– Florida
first time using, I’m kind of lost in this kind of thing.
– fernando Januario de azevedo
and Voce Florida could give me a boost?
– fernando Januario de azevedo
Sorry, this far beyond my knowledge, the best you can do is wait patiently.
– Florida
still quarreled.
– fernando Januario de azevedo