Page 1 of 1

Beginners sql query

Posted: Sun Jan 21, 2024 10:47 pm
by lambro28
For one reason or another, I have 721 orders on the wrong order status ID.

I would like to run an sql query to change the order status from 12 to 3

Just before I mess it up, can somebody confirm this for me please.

go to myphp admin, click on the orders table, then sql.

is this the correct syntax?

SELECT REPLACE('orders_status', '12', '3');

Thanks

Re: Beginners sql query

Posted: Sun Jan 21, 2024 11:16 pm
by burt
Keep it simple.

UPDATE orders SET order_status = 3 WHERE orders_status = 12