切換WordPress的數據庫,我試圖運行搜索和替換命令來更改所有的固定鏈接。#1064語法錯誤,簡單搜索和替換命令?
use ruepi;
update [table_name] set [field_name] =
replace([field_name],'[http://131.193.220.64/ruepi]','[http://ruepi.uic.edu]');
我找回:
SQL query:
UPDATE [table_name] SET [field_name] = REPLACE([field_name],
'[http://131.193.220.64/ruepi]', '[http://ruepi.uic.edu]') ;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '[table_name] set [field_name] =
replace([field_name],'[http://131.193.220.64/rue' at line 1
不知道究竟在何處我的語法有錯嗎?如果任何人都可以快速查看。
編輯:仍然得到#1146錯誤,這是在以前嘗試此命令我得到了同樣的錯誤:
update TABLE_NAME set FIELD_NAME = replace(FIELD_NAME, 'http://131.193.220.64/ruepi',
'http://ruepi.uic.edu/');
錯誤:
Error
SQL query:
UPDATE `table_name` SET `field_name` = 'http://131.193.220.64/ruepi' WHERE
`field_name` = 'http://ruepi.uic.edu';
MySQL said: Documentation
#1146 - Table 'ruepi.table_name' doesn't exist
MySQL使用反引號轉義表/字段名。您正在使用mssql'[]' –
您可能會破壞執行原始搜索/替換的序列化值。檢查[搜索和替換換的WordPress的數據庫(https://interconnectit.com/products/search-and-replace-for-wordpress-databases/) – brasofilo