Joachim Tranberg Posted October 27, 2009 Share Posted October 27, 2009 HiHow can i change a order number from 3 to 1?The same with invoices?The orders have already been placed. Link to comment Share on other sites More sharing options...
TropischBruin Posted October 27, 2009 Share Posted October 27, 2009 You cannot without editing the database. Link to comment Share on other sites More sharing options...
Joachim Tranberg Posted October 27, 2009 Author Share Posted October 27, 2009 So it can be done?How do i edit it in the database? Link to comment Share on other sites More sharing options...
TropischBruin Posted October 27, 2009 Share Posted October 27, 2009 Aks you hoster on how to use phpMyAdmin Link to comment Share on other sites More sharing options...
Joachim Tranberg Posted October 27, 2009 Author Share Posted October 27, 2009 I have access. But Do i just change the name? Or what do i have to do? Link to comment Share on other sites More sharing options...
TropischBruin Posted October 27, 2009 Share Posted October 27, 2009 You want to change te name? or the number? Link to comment Share on other sites More sharing options...
Joachim Tranberg Posted October 27, 2009 Author Share Posted October 27, 2009 The number. Link to comment Share on other sites More sharing options...
TropischBruin Posted October 27, 2009 Share Posted October 27, 2009 In your database you have to find the ordernumber you want to change and change it.Have a look arround, you will learn how the structure of the db is, but do make a backup first. Link to comment Share on other sites More sharing options...
Joachim Tranberg Posted October 28, 2009 Author Share Posted October 28, 2009 I can't find. Where is it located Link to comment Share on other sites More sharing options...
rocky Posted October 29, 2009 Share Posted October 29, 2009 You will need to search 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 More sharing options...
davers44 Posted September 16, 2011 Share Posted September 16, 2011 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 More sharing options...
zyko Posted September 17, 2011 Share Posted September 17, 2011 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 More sharing options...
davers44 Posted September 17, 2011 Share Posted September 17, 2011 That helps but I also found I had to replace it in ps_message, ps_paypal_order and ps_stock_mvt. Seems ok now, I hope there are no other hidden id_order in the database, probably a sql query that finds all of them would be safer. Link to comment Share on other sites More sharing options...
Recommended Posts