Is it possible to run a MySQL query to replace all of one character to something else. Some thing similar to this function in PHP, but instead a MySQL query:
icesolid wrote:Well I see the REPLACE function. However, that only works on a field correct? Is there anyway to just run that query for the whole table?
Clarify, please.
Does "whole table" mean "all the values in a table column"?
There are 10 types of people in this world, those who understand binary and those who don't
Thats not a bad idea, but still, ten of the tables are for long insurance inspection forms, with over 300 questions, which means 300 columns, that will be one hell of a query, but your method posted above will be nicer than a PHP loop .
icesolid wrote:Thats not a bad idea, but still, ten of the tables are for long insurance inspection forms, with over 300 questions, which means 300 columns, that will be one hell of a query, but your method posted above will be nicer than a PHP loop .
Thanks for your time
Dynamically created queries.
[sql]SELECT * FROM information_schema.COLUMNS;[/sql]
and use a stored procedure/PHP code to loop over columns of a string type
EDIT: Sorry, wrong table.
There are 10 types of people in this world, those who understand binary and those who don't
I got myself into all of this when I had to start using UTF-8 for some international symbols that my company starting using. I was using ISO-8859-1 prior to the switch. Well everything went OK, however, MS Word curly quotes and other special characters that MS Word uses do not sit well when you display them in a textarea on a UTF-8 page when they were submitted to the database via ISO-8859-1 encoding. All of the other characters are just fine.
So I am going through and removing all of the MS Word special characters because they are causing some problems when people would go to update a textarea field and have some crazy mumbo jumbo instead of MS Word's curly quotes.
In the future I will always start off with UTF-8, and hope one day Microsoft will get with the rest of us and try to comply better with standards. By the way, IE sucks, but thats another story.