1
I’m running a registration and product sales system. I need to have access to registered units to check how many units still remain to be sold (with each sale I’m decreasing the remaining units).
I have a sales table that contains : id, description, price, sale, day, month, units and other entries that contain the same things.
I used that code:
cursor = banco.cursor()
mudar_estoque = f"SELECT id from cadastros where id = {id_produto_vendido}"
cursor.execute(mudar_estoque)
banco.commit()
I am using the Mysql library.
-- > I was able to execute the command, but how can I get the data obtained through this execution in a variable?