Created
October 17, 2018 05:33
-
-
Save naoaki011/9d0985b87f8143c308afa52cdb74ad55 to your computer and use it in GitHub Desktop.
SQLでファイルパスに含まれる「\」を「/」に変更する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#アイテムテーブル | |
UPDATE `mt_asset` SET `asset_file_path` = REPLACE(`asset_file_path`, '\\', '\/') WHERE `asset_file_path` REGEXP '\\\\' ; | |
#FileInfoテーブル | |
UPDATE `mt_fileinfo` SET `fileinfo_file_path` = REPLACE(`fileinfo_file_path`, 'D:\\inetpub\\wwwroot', '\/powercms\/data\/sites\/01\/files') WHERE `fileinfo_file_path` REGEXP '\\\\'; | |
UPDATE `mt_fileinfo` SET `fileinfo_file_path` = REPLACE(`fileinfo_file_path`, '\\', '\/') WHERE `fileinfo_file_path` REGEXP '\\\\'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment