Anybody work with databases? Let me introduce you to my little friend...

Anybody work with databases? Let me introduce you to my little friend...

PostBy: Richard S. On: Wed May 03, 2017 7:06 pm

I'm not a database guru and one of the problems I had in the past was doing anything beyond a simple find an replace in MySQL. If there was any kind of wildcard involved I was either doing it with a script, exporting the table and doing it in Notepad++ or some convoluted method using CONCAT or whatever

The new server uses MariaDB which is a fork of MySQL and has this function. REGEXP_REPLACE

Code: Select all
UPDATE tb SET column = REGEXP_REPLACE(column, 'regex/whattofind', 'replacement')


Regex I know.... BAM! I know you are drooling if you don't have this function.... . :D
Richard S.
 
Stoker Coal Boiler: Van Wert VA1200
Coal Size/Type: Buckwheat/Anthracite