Hi all, I appear to be having a couple of difficulties with my database query. When I use it as follows, it works perfectly.
SELECT * FROM tmp_cart AS t LEFT JOIN products AS p ON p.id=t.prod_id WHERE t.session_id='1431301305'
However I want to add up all of the quantity fields to produce a total number of shopping cart items. I've used the following which does produce a total of all items but I no longer have all the rows, just one!
SELECT *,SUM(quantity) FROM tmp_cart AS t LEFT JOIN products AS p ON p.id=t.prod_id WHERE t.session_id='1431301305'
Any help is appreciated as always