I have a mySQL table that have a column read_by
which has the rows:
-17-6
-11-8-6-62
-6
-6-22-45
-16-77
-31-3-6-24
These are IDs of users, Every ID starts with a dash -
Now I have changed the user 6 to 136
How to update every row and just change 6 to 136 keeping in mind that there may be IDs like -16, -62, -167... and the ID 6 is in different positions.
Here are the WHERE conditions:
WHERE read_by = "-6"
WHERE read_by LIKE "%-6"
WHERE read_by LIKE "-6-%"
WHERE read_by LIKE "%-6-%"
UPDATE messages SET [...] WHERE ...
How to change the exact 6 and keep the rest as is?
Thanks.