I have implemented the buy function so that I can successfully add purchased stocks to a new database, but upon working on the index function I think my database is structured incorrectly.
Right now my database has a unique transaction number, id, price, symbol, and shares. My problem is when trying to pull the data by id to create the table in index I end up with multiples of the same symbol. Is there a better way to structure my database in buy so that I don't run into this problem?