@@ -59,7 +59,7 @@ class AppServer {
*/
public static function LogCmd($req, $resp) {
$tablename = 'tab_op_log' . date('Ymd'); # 今天的表名
- $old_tablename = 'tab_op_log' . date('Ymd', now(-86400 * 21)); # 待删除的表名
+ $old_tablename = 'tab_op_log' . date('Ymd', now(-86400 * 21)); # 待删除的表名 日志保留21天
$sql = sprintf('create table if not exists %s like `tpl_op_log_tab`;', $tablename); # 创建今天的表
$sql .= sprintf('drop table if exists %s;', $old_tablename); # 循环删除以前的表
$sql .= sprintf("insert into %s (`uid`,`zoneid`,`cmd`,`days`,`param`,`ret`) values ('%s', %d, %d, %d, '%s', '%s');", #