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    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -