คืิิอวันนี้ ทำ DB Track Squid Log ให้ Sapphire แล้ว DB เก่า มัน ขนาดใหญ่ เลย จะกรอกเอาแค่ Log ของหน้า่ที่เป็น mimetype เป็น text/html ไปใช้ ในตารางใหม่ เพราะโปรแกรม ตัวใหม่ เก็บเฉพาะนี้แล้ว เลยอยากจะเอาของเก่ามาสมทบด้วย จะได้ สมบูรณ์
ตัวอย่าง ครับ
INSERT INTO `squid` ( `UserName`, `IP`, `Time`, `URL`, `Size`, `Responce Time`, `Mine Type`, `HTTP Status`, `FQDN`) SELECT `UserName`, `IP`, `Time`, `URL`, `Size`, `Responce Time`, `Mine Type`, `HTTP Status`, `FQDN` from squid1 where `Mine Type` = ‘text/html’;
สามารถอ่านได้ที่
http://dev.mysql.com/doc/refman/5.1/en/insert-select.html