I have created a table named "portfolio" in my database which stores users purchase data while I kept the user_id field of this table NOT UNIQUE ie no primary key so as to let the user buy more same or other stock. But if I query portfolio now for displaying it in index.html as
rows = db.execute("SELECT * FROM portfolio WHERE id = :id", id=session["user_id"]")
how do I access the field data of all of the users rows ie
rows["Symbol"] will give me just the Symbol field of primary row of the user whereas I need all of his rows?
Any suggestions will be appreciated!