Пример #1
0
function DeleteAll()
{
    $q = new mysql_squid_builder();
    $q->QUERY_SQL("TRUNCATE TABLE reports_cache");
    if (!$q->ok) {
        echo $q->mysql_error;
    }
    REMOVE_TABLES_CHRONOS();
}
Пример #2
0
function DeleteAll()
{
    $q = new mysql_squid_builder();
    $postgres = new postgres_sql();
    if (!isAnAdmin()) {
        $AND2 = " WHERE uid='{$_SESSION["uid"]}'";
    }
    $results = $q->QUERY_SQL("SELECT * FROM reports_cache{$AND2}");
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $zmd5 = $ligne["zmd5"];
        $table = "{$zmd5}report";
        $postgres->QUERY_SQL("DROP TABLE \"{$table}\"");
    }
    $q->QUERY_SQL("TRUNCATE TABLE reports_cache");
    REMOVE_TABLES_CHRONOS();
}