Use SQL REPLACE function in UPDATE SET [message #2917] |
Sat, 17 March 2012 02:31 |
kong
Messages: 90 Registered: December 2011
|
Member |
|
|
Wonder how to build and execute a SQL statement like this within the Radicore framework:
UPDATE msg SET author=REPLACE(author,'_',' ') WHERE id>100
Tried using updateSelection($where, $replace),
with $replace = "author='REPLACE(author,'_',' ')'".
However, that will result in the author column being populated with 'REPLACE'.
If this cannot be done within the current framework, we can iterate through each row and update each row separately, or is there a simpler / more efficient way?
|
|
|
|