On the example of an online store. If you go to the Products section in the admin area, then there will be a checkbox next to each product from the list. Select 70 products out of 100 and click Скрыть товар so that it does not appear on the site.
In theory, it is 70 requests. For example, in the visible cell, replace 1 with 0 with each of 70 id.
UPDATE product SET visible=0 WHERE id=1 UPDATE product SET visible=0 WHERE id=2 UPDATE product SET visible=0 WHERE id=3 and so on to id=70 ...
And yes, I know that nobody does this, or rather I’m almost sure) Since this is done so as not to create such a monstrous load on the database?
I also had an idea about all the id which, for example, should not be displayed on the site, write to a single cell through the feed or a point, and then use the explode parse the line, but it seems even crazier to me.
Well, idea # 3, to create such one big request for an update, but wouldn't it be too big?
PS I hope clearly painted
update product set visible=0 where id in(1,2,3,...)- Mike