Hello,
I have a table with 44000 records in it and I am using php to pull out the information I need and to remove part of a string and then insert it back into the database.
I have file names that have the path to their location in one long string.
The php script I wrote it taking a very long time so I was wondering if there was a way to do this in mysql?
an example of a value I am trying to manipulate is:
C:\ACT RESTORE\SONOTEK-Database Files\attachments\file.txt
I want to get rid of C:\ACT RESTORE\SONOTEK-Database Files\attachments\ and just be left with file.txt in the table.
I tried this statement:
UPDATE HISTORY SET Attachment_Path =
REPLACE(Attachment_Path,"C:\ACT RESTORE\SONOTEK-Database Files\attachments\\","");
[code=php]
but it didnt work. Any suggestions on how I could do this? Please let me know and thanks for the help.