I have a notes column that contains text and has an identifier inside the text, something like "some random text (actvityid - 1234)"
In this case, I need to output the identifier 1234 and update the activid column in the same table.
my request is as follows
"UPDATE table_name SET activityId = {$f['activityId']} WHERE notes REGEXP '{$f['activityId']}' "
the problem with this is that if $ f ['activityId'] is 34 or 123, for example, it still updates the activid column with that value. How can I make an exact match on "1234" and update only if it matches the entire line, here is "1234".
Many thanks.
source
share