The stock returns the stocks owned by the user. I want to pass a function lookup() on each stock returned to get the price of the stock. How will I do it since the query returns multiple rows?
rows = "SELECT * FROM :p1 ORDER BY id"
db.execute(rows,{'p1':str(session['user_id'])})
rows = db.fetchall()
stock = rows[0]['symbol']
share = rows[0]['shares']
price = []