Table A
id | name | important |
-----------------------
1 Abe 0
2 Ann 1
3 John 1
4 Bill 0
I have a php array of id values
$ids = [1, 4];
I want update table A setting important column equals 1 if id column value is in $ids array AND setting important column value equals 0 if not.
So for the example, the table after update would be:
id | name | important |
-----------------------
1 Abe 1
2 Ann 0
3 John 0
4 Bill 1
How to do?
Thanks for any help!