Beginners sql query

Open to all! Ask other shopowners for help.
Post Reply
lambro28
Member
Posts: 62
Joined: Sun Jan 03, 2021 2:47 pm
Phoenix Version: v1.1.0.6
Has thanked: 11 times
Been thanked: 8 times

Beginners sql query

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Beginners sql query

Post by burt »

Keep it simple.

UPDATE orders SET order_status = 3 WHERE orders_status = 12


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply