新手上路
- 威望
- 8
- 精华
- 0
- 门户文章
- 0
- 注册时间
- 2023-12-29
|
就是为了用户改名测试的代码语句,这是在后台数据库可操作那儿输入使用的看看吧?(测试正确,注意前缀pre_此为默认!)
下面是使用的一种语法:
//这是在后台开启数据库可操作语句处输入的代码,测试正确,注意前缀pre_此为默认!
update pre_common_member set username = REPLACE(username, '原名', '新名');
update pre_ucenter_members set username = REPLACE(username, '原名', '新名');
update pre_forum_groupuser set username = REPLACE(username, '原名', '新名');
update pre_forum_post set author = REPLACE(author, '原名', '新名');
update pre_forum_thread set author = REPLACE(author, '原名', '新名');
update pre_forum_thread set lastposter = REPLACE(lastposter, '原名', '新名');
UPDATE pre_home_album SET username = REPLACE(username, '原名','新名');
update pre_home_feed set username = REPLACE(username, '原名', '新名');
UPDATE pre_home_visitor SET vusername = REPLACE(vusername, '原名','新名');
//这是加一种写法,结果一样:
//UPDATE pre_forum_post SET author = "原名" WHERE author = "admin";
//UPDATE pre_home_album SET vusername = "新名" WHERE vusername = "原名";
貌似共涉及了8个表,其中一个表改两个字段!
|
|