I make a request to the database

UPDATE `items` SET `status`=1 WHERE `x`=10 AND `y`=20 

This has updated one line.
And how to update 100 lines, if the input data is FOUR numbers X = 10, X = 20, Y = 20, Y = 30, that is, for fields X with a value from 10 to 20 and Y from 20 to 30?
The caveat is that the database structure is as follows:
first comes 100 lines, where the value of the X field increases from 1 to 100 and Y = 1, then the next 100 lines, where X is also from 1 to 100, but Y = 2, and so on to Y = 100, attached a database screen.

enter image description here

    1 answer 1

     UPDATE items SET status = 1 WHERE (x BETWEEN 10 AND 20) AND (y BETWEEN 10 AND 20); 
    • one
      hmm, strange, did not expect from BETWEEN !!)) Thank you! - Sergey V.