Jump to content

Recupero stato ordini


Totti

Recommended Posts

Dovrei recuperare lo stato degli ordini come avviene nel BO, solo che con questa query mi ritorna tutta la storia di ogni ordine.

 

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 an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...