user3711642
user3711642

Reputation: 109

Mass replace all values within a table field in phpMyadmin

I have a site where there are quite a lot of products.

I need to change all stock values within a table field to X (say 100 for example). As it's an online store, all of the stock levels are different as many orders have been made, so I was wondering whether it was possible to mass replace all values within a field within a table to X value.

In the past I've done Search and Replace for a specific value (such as changing all stock with 0 to 100) but I need all different values to be changed.

Is this possible?

Kind regards Liam

Upvotes: 2

Views: 6292

Answers (2)

Muhammed Shuhaib
Muhammed Shuhaib

Reputation: 314

try this

    update 
    table_name
    set x=100

x is table field name.

Upvotes: 1

Tero Lahtinen
Tero Lahtinen

Reputation: 524

It's simple SQL:

UPDATE tablename SET tablefield=X

Or did I miss something?

Upvotes: 5

Related Questions