title: How to SUM products price in this query
body: <p>I have a query</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT SUM(product.price)
  FROM cart, product
  WHERE cart.idUser = :idUser AND cart.idProduct = product.id
  </code></pre>
  
  <p>If someone buys 2 of the same products in one order this query only sums 1 time the price.
  eg: 3 same products ordered = 3*10$, query returns only 10$</p>
  
  <p>If someone buys 2 different products the query works fine.
  eg: 2 different products = 1*5$ AND 1*10$, query returns 15$ </p>
  
  <p>I have these tables:</p>
  
  <ol>
  <li><p>User</p></li>
  <li><p>Order with columnns: id, idUser, value</p></li>
  <li><p>Cart with columnns: idUser, idProduct, quantity</p></li>
  <li><p>Product with columnns: id,name,price</p></li>
  </ol>