學務系統資料庫匯出
mysqldump -u帳號 -p密碼 --default-character-set=latin1 sfs3 > sfs3.sql
學務系統某些資料表匯出
mysqldump -u帳號 -p密碼 --default-character-set=latin1 sfs3 table1 table2 table3 > sfs3_tables.sql
資料庫匯入
mysql -u帳號 -p密碼 sfs3 < sfs3.sql
資料表匯入
mysql -u帳號 -p密碼 sfs3 < sfs3_tables.sql
2018年11月30日 星期五
2015年8月12日 星期三
update select查詢後的資料
原來Update跟Select也可以這麼麻吉,太厲害了。
解決10年前grad_stud資料表畢業生的流水號被誤刪的情形。
update `grad_stud` as A,
(select student_sn,stud_id from stud_seme WHERE seme_year_seme = 0932 and seme_class LIKE '9%') as B
set A.`student_sn`= B.`student_sn`
where A.`stud_grad_year`= 93 and A.`stud_id`=B.`stud_id`;
解決10年前grad_stud資料表畢業生的流水號被誤刪的情形。
update `grad_stud` as A,
(select student_sn,stud_id from stud_seme WHERE seme_year_seme = 0932 and seme_class LIKE '9%') as B
set A.`student_sn`= B.`student_sn`
where A.`stud_grad_year`= 93 and A.`stud_id`=B.`stud_id`;
2013年8月3日 星期六
讓Apache2順利讀取中文檔名
學務系統之應用已深植本校網站及行政業務,但因其編碼支援為big5,而非現今主流--utf8,而且同仁在使用時仍喜歡中文檔名或資料夾,造成瀏覽器無法讀取問題,或者必須進一步設定才能順利讀取中文檔名或路徑。
今天上網時,無意間發現原來只要設定好apache,就能解決這個困擾。
一、要安裝mod-encoding模組:
二、增加encoding.conf設定檔
參考網站:
webadmin of ymes
延深閱讀:
Apache2的模組化功能
今天上網時,無意間發現原來只要設定好apache,就能解決這個困擾。
一、要安裝mod-encoding模組:
sudo apt-get update sudo apt-get install libapache2-mod-encoding
二、增加encoding.conf設定檔
vi /etc/apache2/mods-available/encoding.conf
- 輸入下列內容:
<IfModule mod_encoding.c>
EncodingEngine on
NormalizeUsername on
SetServerEncoding Big5
DefaultClientEncoding Big5 UTF-8
AddClientEncoding "(Microsoft .* DAV $)" Big5 UTF-8
AddClientEncoding "Microsoft .* DAV" Big5 UTF-8
AddClientEncoding "Microsoft-WebDAV*" Big5 UTF-8
</IfModule>
cd /etc/apache2/mods-enabled ln -s ../mods-available/encoding.load ln -s ../mods-available/encoding.confps.也可以下a2enmod encoding指令
/etc/init.d/apache2 restart
參考網站:
webadmin of ymes
延深閱讀:
Apache2的模組化功能
訂閱:
文章 (Atom)