Jump to content

Order status


Recommended Posts

I should retrieve the status of orders as in BO, just that with this query returns me the whole story with every order

 

 

SELECT	    ps_order_history.id_order_history, ps_order_history.id_employee, ps_order_history.id_order, ps_order_history.id_order_state, ps_order_history.date_add,
					 ps_employee.firstname, ps_employee.lastname, ps_order_state_lang.name
FROM		    ps_orders INNER JOIN
					 ps_order_history ON ps_orders.id_order = ps_order_history.id_order INNER JOIN
					 ps_order_state ON ps_order_history.id_order_state = ps_order_state.id_order_state INNER JOIN
					 ps_order_state_lang ON ps_orders.id_lang = ps_order_state_lang.id_lang INNER JOIN
					 ps_employee ON ps_order_history.id_employee = ps_employee.id_employee
ORDER BY ps_order_history.date_add DESC, ps_order_history.id_order_history DESC

Link to comment
Share on other sites

×
×
  • Create New...