Editing data in a MySQL table

I know how to alter text in a MySql table but how do I format individual words? I want to highlight and italicise a word. Also I want a link address to be underscored and highlighted.

1 Like

You can’t do that with the content of the database itself as how you do it is dependent on how the data is being used - the wrapper for the content will be different for HTML, PDF, Word, and whatever other places that the data might get used.

What you will need to do is to apply the styling when the data is actually used after being read from the database rather than applying styling only applicable to one type of output to the data itself.

If you need a way to keep track of the styling with the actual data then one option would be to apply some simple markers to the data to indicate the different styling (Markdown is one alternative). The database reads would then strip that out when the content is needed as plain text and convert it to the appropriate markup for the destination when that destination provides a way to show that styling.

I’d avoid using HTML, PDF or Word type styling in the database itself as all of those are relatively difficult to convert to the other alternatives when the data is being used elsewhere.

1 Like

Thanks Felgall, I’ll give it a go.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.