It is necessary to make UPDATE records in the table that have id1| in the field id1| while the admin field looks like this or that idN| or idN|idN|....

N - any number

  • one
    It is better to alter the structure of the database, so that there would be no list fields. Well, if you really want something concat ('|', field, '|') like '% | id1 |%' well, to the end '|' you can not add to the field, if it is exactly there - Mike

1 answer 1

Use LIKE:

 UPDATE ... WHERE admin like '%id1|%'