A
A
ART42018-05-28 14:34:01
MySQL
ART4, 2018-05-28 14:34:01

Bulk mysql query?

Good afternoon, tell me please. There is a request

$this->db->query('UPDATE `s_variants` SET `stock` = REPLACE(`stock`, "99999", "0");');

It can be seen that in the s_variants table in the stock column , 99999 is replaced by 0

e84cc0d9ab.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fixid, 2018-05-28
@ART4

UPDATE s_variants SET price/stock = 0
will set the price/stock field value to 0 in all records.
Instead of price/stock, leave the desired column

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question