So I have a table containing fields description and short_description. I imported these values from a different system.
Now I’d need to know how to wrap these description texts into a <p> tag.
The records are always always single-paragraph, so no need for the logic for multiple <p>‘s for each two linebreaks.
What I want to do is go through each record, and add "<p>" to the beginning, and "</p>" to the end of both of these columns. However, after some googling I didn’t find out a way to include the original value in the new value for SET in UPDATE.
How would that work? Or is there a better way?
You need to
concatenatethe strings together:concatreturns null if any argument is null, so ifmy_columnhas no value you won’t end up with<p></p>