Jump to content

How to change Ordernumber and Invoice number?


Recommended Posts

  • 1 year later...

I need to change an id_order number of an already placed order.

Is there a sql query to replace id_order number of an order with another number?

 

 

EDIT I found one:

 

UPDATE ps_orders

SET id_order='1'

WHERE id_order='2'

 

 

I'm no sql expert but this replace only one table at the time like ps_orders and I'm afraid to miss one, how can I run it to be sure id_order is replaced everywhere in the database? Or how can I see how many id_order istances are in the whole database?

Link to comment
Share on other sites

Or how can I see how many id_order istances are in the whole database?

 

you need to make changes for order id on all the listed tables - ps_orders, ps_order_detail, ps_order_discount, ps_order_history, ps_order_return and ps_order_slip for each row with id_order = 3 and change it to 1

Link to comment
Share on other sites

×
×
  • Create New...