I'm really struggling with this one. SO I have 2 tables:
WHERE pending_cart_id = 18
SELECT SUM(price) as TotalCartPrice FROM products WHERE id = '274'
Would something like this not work?
Select sum(b.price*a.quantity) from pending_cart_items a join products b on a.product_id=b.id where a.pending_cart_id =18
Edit: Just realized I'd omitted the quantity from the cart computation :)