This question already has an answer here:
- Doing calculations in MySQL vs PHP 5 answers
I have a question, what is the most optimal way for replace the strings for example, I want to replace and with ''. I have 2 options :
-
Replaces nested:
SELECT REPLACE(REPLACE(m3.old_message,' ',''),' ','')
-
Preg replace:
if ($aField== 'user') { $sValue = preg_replace... }
Thx in advance.
</div>