数据表批量改名一法 |
提示: 阅读权限:公开 来源:jiuhecai 作者:≈蓝色海洋≡ |
梦,做站长。 百度到帝国cms 学习 观摩 研究 相信很多人和我一样一样的
淘宝也罢,朋友赠的也罢,兴冲冲拿到了一份模版 安装到本机调试 不错不错
只是,那数据表前缀那么那么长,有点不舒服。 改表名!你有这个冲动吗? 命令不会?简单:ALTER TABLE 原名 RENAME TO 新名;
呵呵! 改了一个。 且慢,不好了,200多个表。 怕呀改到天黑黑了。
无奈问度娘,度娘说:批量 前后腾挪,竟成。 不私,与君享如下:
现在的前缀:www_zhnogyf_com_qwqianzhan 希望修改为:shijianf10 工具:phpmyadmin
第一步:打开冰箱之门。构造一个sql查询,输出为批处理的改名语句 Select CONCAT( 'ALTER TABLE ', table_name, ' RENAME TO ', replace(table_name,"www_zhnogyf_com_qwqianzhan","shijianf10"),';' ) FROM information_schema.tables Where table_name LIKE 'www_zhnogyf_com_qwqianzhan%';
第二步:把大象复制到冰箱里。在phpmyadmin中执行之。复制执行的结果 我这里为:
ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_doc_index RENAME TO shijianf10_ecms_info_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_index RENAME TO shijianf10_ecms_info_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_article RENAME TO shijianf10_ecms_infoclass_article; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_download RENAME TO shijianf10_ecms_infoclass_download; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_flash RENAME TO shijianf10_ecms_infoclass_flash; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_info RENAME TO shijianf10_ecms_infoclass_info; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_movie RENAME TO shijianf10_ecms_infoclass_movie; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_news RENAME TO shijianf10_ecms_infoclass_news; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_photo RENAME TO shijianf10_ecms_infoclass_photo; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_pic RENAME TO shijianf10_ecms_infoclass_pic; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infoclass_shop RENAME TO shijianf10_ecms_infoclass_shop; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_article RENAME TO shijianf10_ecms_infotmp_article; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_download RENAME TO shijianf10_ecms_infotmp_download; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_flash RENAME TO shijianf10_ecms_infotmp_flash; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_info RENAME TO shijianf10_ecms_infotmp_info; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_movie RENAME TO shijianf10_ecms_infotmp_movie; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_news RENAME TO shijianf10_ecms_infotmp_news; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_photo RENAME TO shijianf10_ecms_infotmp_photo; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_pic RENAME TO shijianf10_ecms_infotmp_pic; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_infotmp_shop RENAME TO shijianf10_ecms_infotmp_shop; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie RENAME TO shijianf10_ecms_movie; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_check RENAME TO shijianf10_ecms_movie_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_check_data RENAME TO shijianf10_ecms_movie_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_data_1 RENAME TO shijianf10_ecms_movie_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_doc RENAME TO shijianf10_ecms_movie_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_doc_data RENAME TO shijianf10_ecms_movie_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_doc_index RENAME TO shijianf10_ecms_movie_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_movie_index RENAME TO shijianf10_ecms_movie_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news RENAME TO shijianf10_ecms_news; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_check RENAME TO shijianf10_ecms_news_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_check_data RENAME TO shijianf10_ecms_news_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_data_1 RENAME TO shijianf10_ecms_news_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_doc RENAME TO shijianf10_ecms_news_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_doc_data RENAME TO shijianf10_ecms_news_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_doc_index RENAME TO shijianf10_ecms_news_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_news_index RENAME TO shijianf10_ecms_news_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo RENAME TO shijianf10_ecms_photo; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_check RENAME TO shijianf10_ecms_photo_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_check_data RENAME TO shijianf10_ecms_photo_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_data_1 RENAME TO shijianf10_ecms_photo_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_doc RENAME TO shijianf10_ecms_photo_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_doc_data RENAME TO shijianf10_ecms_photo_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_doc_index RENAME TO shijianf10_ecms_photo_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_photo_index RENAME TO shijianf10_ecms_photo_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic RENAME TO shijianf10_ecms_pic; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_check RENAME TO shijianf10_ecms_pic_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_check_data RENAME TO shijianf10_ecms_pic_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_data_1 RENAME TO shijianf10_ecms_pic_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_doc RENAME TO shijianf10_ecms_pic_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_doc_data RENAME TO shijianf10_ecms_pic_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_doc_index RENAME TO shijianf10_ecms_pic_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_pic_index RENAME TO shijianf10_ecms_pic_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop RENAME TO shijianf10_ecms_shop; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_check RENAME TO shijianf10_ecms_shop_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_check_data RENAME TO shijianf10_ecms_shop_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_data_1 RENAME TO shijianf10_ecms_shop_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_doc RENAME TO shijianf10_ecms_shop_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_doc_data RENAME TO shijianf10_ecms_shop_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_doc_index RENAME TO shijianf10_ecms_shop_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_shop_index RENAME TO shijianf10_ecms_shop_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsad RENAME TO shijianf10_enewsad; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsadclass RENAME TO shijianf10_enewsadclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsadminstyle RENAME TO shijianf10_enewsadminstyle; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbefrom RENAME TO shijianf10_enewsbefrom; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbq RENAME TO shijianf10_enewsbq; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbqclass RENAME TO shijianf10_enewsbqclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbqtemp RENAME TO shijianf10_enewsbqtemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbqtempclass RENAME TO shijianf10_enewsbqtempclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbuybak RENAME TO shijianf10_enewsbuybak; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsbuygroup RENAME TO shijianf10_enewsbuygroup; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewscard RENAME TO shijianf10_enewscard; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclass RENAME TO shijianf10_enewsclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclass_stats RENAME TO shijianf10_enewsclass_stats; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclass_stats_ip RENAME TO shijianf10_enewsclass_stats_ip; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclass_stats_set RENAME TO shijianf10_enewsclass_stats_set; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclassadd RENAME TO shijianf10_enewsclassadd; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclassf RENAME TO shijianf10_enewsclassf; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclassnavcache RENAME TO shijianf10_enewsclassnavcache; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclasstemp RENAME TO shijianf10_enewsclasstemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsclasstempclass RENAME TO shijianf10_enewsclasstempclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsdiggips RENAME TO shijianf10_enewsdiggips; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsdo RENAME TO shijianf10_enewsdo; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsdolog RENAME TO shijianf10_enewsdolog; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsdownerror RENAME TO shijianf10_enewsdownerror; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsdownrecord RENAME TO shijianf10_enewsdownrecord; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsdownurlqz RENAME TO shijianf10_enewsdownurlqz; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewserrorclass RENAME TO shijianf10_enewserrorclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsf RENAME TO shijianf10_enewsf; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfava RENAME TO shijianf10_enewsfava; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfavaclass RENAME TO shijianf10_enewsfavaclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfeedback RENAME TO shijianf10_enewsfeedback; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfeedbackclass RENAME TO shijianf10_enewsfeedbackclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfeedbackf RENAME TO shijianf10_enewsfeedbackf; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfile_1 RENAME TO shijianf10_enewsfile_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfile_member RENAME TO shijianf10_enewsfile_member; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfile_other RENAME TO shijianf10_enewsfile_other; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsfile_public RENAME TO shijianf10_enewsfile_public; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsgbook RENAME TO shijianf10_enewsgbook; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsgbookclass RENAME TO shijianf10_enewsgbookclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsgfenip RENAME TO shijianf10_enewsgfenip; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsgroup RENAME TO shijianf10_enewsgroup; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewshmsg RENAME TO shijianf10_enewshmsg; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewshnotice RENAME TO shijianf10_enewshnotice; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewshy RENAME TO shijianf10_enewshy; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewshyclass RENAME TO shijianf10_enewshyclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsindexpage RENAME TO shijianf10_enewsindexpage; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsinfoclass RENAME TO shijianf10_enewsinfoclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsinfotype RENAME TO shijianf10_enewsinfotype; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsinfovote RENAME TO shijianf10_enewsinfovote; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsjstemp RENAME TO shijianf10_enewsjstemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsjstempclass RENAME TO shijianf10_enewsjstempclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewskey RENAME TO shijianf10_enewskey; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewskeyclass RENAME TO shijianf10_enewskeyclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewslink RENAME TO shijianf10_enewslink; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewslinkclass RENAME TO shijianf10_enewslinkclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewslinktmp RENAME TO shijianf10_enewslinktmp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewslisttemp RENAME TO shijianf10_enewslisttemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewslisttempclass RENAME TO shijianf10_enewslisttempclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewslog RENAME TO shijianf10_enewslog; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsloginfail RENAME TO shijianf10_enewsloginfail; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmember RENAME TO shijianf10_enewsmember; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmember_connect RENAME TO shijianf10_enewsmember_connect; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmember_connect_app RENAME TO shijianf10_enewsmember_connect_app; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmemberadd RENAME TO shijianf10_enewsmemberadd; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmemberf RENAME TO shijianf10_enewsmemberf; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmemberfeedback RENAME TO shijianf10_enewsmemberfeedback; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmemberform RENAME TO shijianf10_enewsmemberform; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmembergbook RENAME TO shijianf10_enewsmembergbook; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmembergroup RENAME TO shijianf10_enewsmembergroup; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmemberpub RENAME TO shijianf10_enewsmemberpub; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmenu RENAME TO shijianf10_enewsmenu; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmenuclass RENAME TO shijianf10_enewsmenuclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmod RENAME TO shijianf10_enewsmod; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsmoreport RENAME TO shijianf10_enewsmoreport; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsnewstemp RENAME TO shijianf10_enewsnewstemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsnewstempclass RENAME TO shijianf10_enewsnewstempclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsnotcj RENAME TO shijianf10_enewsnotcj; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsnotice RENAME TO shijianf10_enewsnotice; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspage RENAME TO shijianf10_enewspage; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspageclass RENAME TO shijianf10_enewspageclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspagetemp RENAME TO shijianf10_enewspagetemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspayapi RENAME TO shijianf10_enewspayapi; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspayrecord RENAME TO shijianf10_enewspayrecord; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspic RENAME TO shijianf10_enewspic; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspicclass RENAME TO shijianf10_enewspicclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspl_1 RENAME TO shijianf10_enewspl_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspl_set RENAME TO shijianf10_enewspl_set; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsplayer RENAME TO shijianf10_enewsplayer; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsplf RENAME TO shijianf10_enewsplf; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspltemp RENAME TO shijianf10_enewspltemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspostdata RENAME TO shijianf10_enewspostdata; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspostserver RENAME TO shijianf10_enewspostserver; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsprinttemp RENAME TO shijianf10_enewsprinttemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspublic RENAME TO shijianf10_enewspublic; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspublic_update RENAME TO shijianf10_enewspublic_update; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspubtemp RENAME TO shijianf10_enewspubtemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspubvar RENAME TO shijianf10_enewspubvar; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewspubvarclass RENAME TO shijianf10_enewspubvarclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsqmsg RENAME TO shijianf10_enewsqmsg; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssearch RENAME TO shijianf10_enewssearch; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssearchall RENAME TO shijianf10_enewssearchall; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssearchall_load RENAME TO shijianf10_enewssearchall_load; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssearchtemp RENAME TO shijianf10_enewssearchtemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssearchtempclass RENAME TO shijianf10_enewssearchtempclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshop_address RENAME TO shijianf10_enewsshop_address; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshop_ddlog RENAME TO shijianf10_enewsshop_ddlog; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshop_precode RENAME TO shijianf10_enewsshop_precode; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshop_set RENAME TO shijianf10_enewsshop_set; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshopdd RENAME TO shijianf10_enewsshopdd; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshopdd_add RENAME TO shijianf10_enewsshopdd_add; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshoppayfs RENAME TO shijianf10_enewsshoppayfs; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsshopps RENAME TO shijianf10_enewsshopps; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssp RENAME TO shijianf10_enewssp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssp_1 RENAME TO shijianf10_enewssp_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssp_2 RENAME TO shijianf10_enewssp_2; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssp_3 RENAME TO shijianf10_enewssp_3; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssp_3_bak RENAME TO shijianf10_enewssp_3_bak; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsspacestyle RENAME TO shijianf10_enewsspacestyle; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsspclass RENAME TO shijianf10_enewsspclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewssql RENAME TO shijianf10_enewssql; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstable RENAME TO shijianf10_enewstable; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstags RENAME TO shijianf10_enewstags; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstagsclass RENAME TO shijianf10_enewstagsclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstagsdata RENAME TO shijianf10_enewstagsdata; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstask RENAME TO shijianf10_enewstask; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstempbak RENAME TO shijianf10_enewstempbak; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstempdt RENAME TO shijianf10_enewstempdt; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstempgroup RENAME TO shijianf10_enewstempgroup; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstempvar RENAME TO shijianf10_enewstempvar; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstempvarclass RENAME TO shijianf10_enewstempvarclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewstogzts RENAME TO shijianf10_enewstogzts; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuser RENAME TO shijianf10_enewsuser; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuseradd RENAME TO shijianf10_enewsuseradd; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuserclass RENAME TO shijianf10_enewsuserclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuserjs RENAME TO shijianf10_enewsuserjs; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuserjsclass RENAME TO shijianf10_enewsuserjsclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuserlist RENAME TO shijianf10_enewsuserlist; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuserlistclass RENAME TO shijianf10_enewsuserlistclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsuserloginck RENAME TO shijianf10_enewsuserloginck; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsvote RENAME TO shijianf10_enewsvote; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsvotemod RENAME TO shijianf10_enewsvotemod; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsvotetemp RENAME TO shijianf10_enewsvotetemp; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewswapstyle RENAME TO shijianf10_enewswapstyle; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewswfinfo RENAME TO shijianf10_enewswfinfo; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewswfinfolog RENAME TO shijianf10_enewswfinfolog; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewswords RENAME TO shijianf10_enewswords; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsworkflow RENAME TO shijianf10_enewsworkflow; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsworkflowitem RENAME TO shijianf10_enewsworkflowitem; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewswriter RENAME TO shijianf10_enewswriter; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsyh RENAME TO shijianf10_enewsyh; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewszt RENAME TO shijianf10_enewszt; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsztadd RENAME TO shijianf10_enewsztadd; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsztclass RENAME TO shijianf10_enewsztclass; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsztf RENAME TO shijianf10_enewsztf; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewsztinfo RENAME TO shijianf10_enewsztinfo; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewszttype RENAME TO shijianf10_enewszttype; ALTER TABLE www_zhnogyf_com_qwqianzhan_enewszttypeadd RENAME TO shijianf10_enewszttypeadd; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article RENAME TO shijianf10_ecms_article; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_check RENAME TO shijianf10_ecms_article_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_check_data RENAME TO shijianf10_ecms_article_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_data_1 RENAME TO shijianf10_ecms_article_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_doc RENAME TO shijianf10_ecms_article_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_doc_data RENAME TO shijianf10_ecms_article_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_doc_index RENAME TO shijianf10_ecms_article_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_article_index RENAME TO shijianf10_ecms_article_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download RENAME TO shijianf10_ecms_download; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_check RENAME TO shijianf10_ecms_download_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_check_data RENAME TO shijianf10_ecms_download_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_data_1 RENAME TO shijianf10_ecms_download_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_doc RENAME TO shijianf10_ecms_download_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_doc_data RENAME TO shijianf10_ecms_download_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_doc_index RENAME TO shijianf10_ecms_download_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_download_index RENAME TO shijianf10_ecms_download_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash RENAME TO shijianf10_ecms_flash; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_check RENAME TO shijianf10_ecms_flash_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_check_data RENAME TO shijianf10_ecms_flash_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_data_1 RENAME TO shijianf10_ecms_flash_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_doc RENAME TO shijianf10_ecms_flash_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_doc_data RENAME TO shijianf10_ecms_flash_doc_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_doc_index RENAME TO shijianf10_ecms_flash_doc_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_flash_index RENAME TO shijianf10_ecms_flash_index; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info RENAME TO shijianf10_ecms_info; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_check RENAME TO shijianf10_ecms_info_check; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_check_data RENAME TO shijianf10_ecms_info_check_data; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_data_1 RENAME TO shijianf10_ecms_info_data_1; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_doc RENAME TO shijianf10_ecms_info_doc; ALTER TABLE www_zhnogyf_com_qwqianzhan_ecms_info_doc_data RENAME TO shijianf10_ecms_info_doc_data;
注* 有个小技巧,需要修改显示为全部显示,并要求他把结果显示到一个页面里。不分页了。聪明的你,肯定能搞定@!
第三步:关上冰箱门。选择你要修改的数据库,执行上面的sql语句。刷新后,ok了。
最后,别忘记修改e/config/config.php文件,把其中的数据表前缀改为你修改后的(dbtbpre么么哒)。
写完了,抛砖引玉 也许你有更好的办法呢。
|
|
|
|