Commit 89d6d90e authored by clone's avatar clone

1

parent 1db44805
...@@ -13,7 +13,7 @@ use think\console\command\make\Model; ...@@ -13,7 +13,7 @@ use think\console\command\make\Model;
class KillOutTimeSql{ class KillOutTimeSql{
public function killOutTimeSql(){ public function killOutTimeSql(){
$model = new ASite(); $model = new ASite();
$sql = "select concat('KILL ',id,';') as kill_sql,info from information_schema.processlist where user='tl_root' and time > 20 and db='db_tongliandichan' or db is null"; $sql = "select concat('KILL ',id) as kill_sql,info from information_schema.processlist where user='tl_root' and time > 20 and db='db_tongliandichan' or db is null";
//$sql = "select concat('KILL ',id,';') as kill_sql from information_schema.processlist where user='tldc_online' and time > 20 and db='db_tongliandichan' or db is null"; //$sql = "select concat('KILL ',id,';') as kill_sql from information_schema.processlist where user='tldc_online' and time > 20 and db='db_tongliandichan' or db is null";
$result = $model->query($sql); $result = $model->query($sql);
if($result){ if($result){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment