PHP mysql Order by and Group By query -
In the history of my order, I am currently listing all the previous orders to all customers, however, not in date order . My current question is: Select the order item ID, from the order order where the order ID = $ orderind group order ID; After this query, I use a loop, for each order, to print the previous order in the table. However, I want to print the previous order by 'order by date'. After the groupbie I had ordered the date from date but there was no difference in the result printing. Any guidance will be appreciated. Since you are filtering records from OrderID Need GROUP BY ? SELECT OrderItemID, date from the order, where order id = $ order order dsc