I\'m building a category list and I\'m unsure how to store the Ampersand symbol
in MySQL database. Is there any problem/disadvantage if I use \'&\'
. Are the
We store '&' into database fields all the time, it's fine to do so (at-least I've never heard an argument otherwise).
If you're only ever using the string in a HTML page you could just store the HTML safe &
version I suppose. I would suggest that storing '&' and escaping it when you read it would be better though (in-case you need to use the string in a non-HTML context in the future).