I'm kinda stumped on this one... so I thought I would ask for help.
Basically, I have 2 tables. One for products, and one for shopping carts. I want to total up the number of products sold in a particular month, and update a field that shows this total quantity sold.
gk_products is the first table, with pSold as the total number sold this month.
gk_carts is the other, that has pDate and pQty for when and how many an item was sold.
So my guess would be,
update gk_products, gk_carts set gk_products.pSold=sum(gk_carts.pQty) where gk_products.pNum=gk_carts.pNum and gk_carts.pDate like "2005-06-%"
But of course I get an "Invalid Group" error.
Anyone have some ideas on how I can do this?
Thanks!
-Shaw