$query_timeout) && ( strpos($query, "select") !== false || strpos($query, "create temporary table") !== false ) || (($type == "Sleep") && ($time > $sleep_timeout)) ) { # Kill this process. echo "killing $id... $info\n"; run_command($mysql_command . " kill " . $id); } } sleep(10); }