Concatenate field value in replace() mysql
Posted: 12 May 2018, 07:41
Hello,
How can I concatenate the value of a string in the replace() statement in mysql?
For example, in the 'content' column i have something like this:
- The "name_val" is the value of the field 'name' in the same table.
I want to delete /replace all the '{{$name_val}}' sub-string from content, so, I need to apply Update with replace() statement with the value of the 'name' column.
But, how to add the value of the 'name' column in replace()?
How can I concatenate the value of a string in the replace() statement in mysql?
For example, in the 'content' column i have something like this:
Code: Select all
some content... {{$name_val}}
other text...
I want to delete /replace all the '{{$name_val}}' sub-string from content, so, I need to apply Update with replace() statement with the value of the 'name' column.
But, how to add the value of the 'name' column in replace()?