I\'m writing a function that calculates the total $ amount by querying the database to get the price, and then multiplying it by the quantity. It does this for every item in