Results 1 to 4 of 4
Aug 21, 2012, 22:36 #1
- Join Date
- Aug 2012
- 0 Post(s)
- 0 Thread(s)
GROUP BY HAVING not working for my queryCode:
SELECT * FROM `order_offer` WHERE `order_id` = '1131201' GROUP BY `offer_id` HAVING `offer_version` = MAX(offer_version)
Unfortunately, this isn't working at all. If you have any suggestions, I would greatly appreciate it. I was thinking of just figuring out the solution with php(I am not well versed in sql), but I should probably do it right.
For each order we make an offer per product in the basket. That way we can modify each items pricing and keep the previous record. It is all for records.
Thanks for the help!