当前位置: 首页>>代码示例>>PHP>>正文


PHP mysql_squid_builder::LIST_TABLES_DAYS方法代码示例

本文整理汇总了PHP中mysql_squid_builder::LIST_TABLES_DAYS方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_squid_builder::LIST_TABLES_DAYS方法的具体用法?PHP mysql_squid_builder::LIST_TABLES_DAYS怎么用?PHP mysql_squid_builder::LIST_TABLES_DAYS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysql_squid_builder的用法示例。


在下文中一共展示了mysql_squid_builder::LIST_TABLES_DAYS方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getmypid

}
$mypid = getmypid();
@file_put_contents($pidfile, $mypid);
$q = new mysql_squid_builder();
$sql = "SELECT * FROM categorize_changes";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
    writelogs("Fatal Error: {$q->mysql_error}", __CLASS__ . '/' . __FUNCTION__, __FILE__, __LINE__);
    die;
}
if (mysql_num_rows($results) == 0) {
    echo "No changes\n";
    die;
}
$table_hours = $q->LIST_TABLES_HOURS();
$table_days = $q->LIST_TABLES_DAYS();
$table_week = $q->LIST_TABLES_WEEKS();
$ALREADY = array();
$MAX = mysql_num_rows($results);
$D = 0;
while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
    if (isset($ALREADY[$ligne["sitename"]])) {
        $q->QUERY_SQL("DELETE FROM categorize_changes WHERE `zmd5`='{$ligne["zmd5"]}'");
        continue;
    }
    $website = $ligne["sitename"];
    $categories = $q->GET_CATEGORIES($website, true);
    $ALREADY[$ligne["sitename"]] = true;
    reset($table_hours);
    reset($table_days);
    reset($table_week);
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:exec.re-categorize.php

示例2: clean_squid_stats_dbs

function clean_squid_stats_dbs()
{
    $sock = new sockets();
    $DisableArticaProxyStatistics = $sock->GET_INFO("DisableArticaProxyStatistics");
    $CleanArticaSquidDatabases = $sock->GET_INFO("CleanArticaSquidDatabases");
    if (!is_numeric($DisableArticaProxyStatistics)) {
        $DisableArticaProxyStatistics = 0;
    }
    if (!is_numeric($CleanArticaSquidDatabases)) {
        $CleanArticaSquidDatabases = 0;
    }
    if (!$GLOBALS["FORCE"]) {
        if ($CleanArticaSquidDatabases == 0) {
            echo "Option is not activated...\n";
            return;
        }
    }
    $q = new mysql_squid_builder();
    $tables = $q->LIST_TABLES_DAYS();
    $rows = 0;
    $count_tables = 0;
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_DAYS_BLOCKED();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_MEMBERS();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_MONTH();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $tables = $q->LIST_TABLES_WEEKS();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $q = new mysql_catz();
    $tables = $q->LIST_TABLES_CATEGORIES();
    while (list($num, $table) = each($tables)) {
        $rows = $rows + $q->COUNT_ROWS($table);
        if ($GLOBALS["VERBOSE"]) {
            echo " Delete table {$table} {$rows} rows \n";
        }
        $count_tables++;
        $q->DELETE_TABLE($table);
    }
    $q = new mysql();
    if ($q->DATABASE_EXISTS("catz")) {
        $q->DELETE_DATABASE("catz");
    }
    if ($count_tables > 0) {
        mysql_admin_mysql(1, "Restarting MySQL service...", null, __FILE__, __LINE__);
        shell_exec("/etc/init.d/mysql restart");
    }
    $sock->TOP_NOTIFY("{$count_tables} statistics tables as been deleted with {$rows} rows", "info");
    //print_r($tables);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:86,代码来源:exec.mysql.clean.php

示例3: remove_numeric_members

function remove_numeric_members()
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . "." . __FUNCTION__ . ".pid";
    $pid = @file_get_contents($pidfile);
    if ($pid < 100) {
        $pid = null;
    }
    if ($unix->process_exists($pid, basename(__FILE__))) {
        $timepid = $unix->PROCCESS_TIME_MIN($pid);
        ufdbguard_admin_events("Already executed pid {$pid} since {$timepid}", __FUNCTION__, __FILE__, __LINE__, "reports");
        if ($GLOBALS["VERBOSE"]) {
            echo "Already executed pid {$pid}\n";
        }
        return;
    }
    $q = new mysql_squid_builder();
    $q->QUERY_SQL("DELETE FROM members_uid WHERE uid REGEXP '^[0-9]+\$'");
    $q->QUERY_SQL("DELETE FROM UserAuthDaysGrouped WHERE uid REGEXP '^[0-9]+\$'");
    $q->QUERY_SQL("DELETE FROM UserAutDB WHERE uid REGEXP '^[0-9]+\$'");
    $tables = $q->LIST_TABLES_WWWUID();
    while (list($tablename, $ligne) = each($tables)) {
        if (!preg_match("#^www_[0-9]+\$#", $ligne)) {
            continue;
        }
        $q->QUERY_SQL("DROP TABLE {$tablename}");
    }
    $tables = $q->LIST_TABLES_DAYS();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
    $tables = $q->LIST_TABLES_WEEKS();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
    $tables = $q->LIST_TABLES_MONTH();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
    $tables = $q->LIST_TABLES_MEMBERS();
    while (list($tablename, $ligne) = each($tables)) {
        $q->QUERY_SQL("DELETE FROM {$tablename} WHERE uid REGEXP '^[0-9]+\$'");
    }
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:44,代码来源:exec.squidlogs.purge.php


注:本文中的mysql_squid_builder::LIST_TABLES_DAYS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。