private function getBlobTableWhereExpr($oldNumericTables, $table)
    {
        $where = "";
        if (!empty($this->reportPeriodsToKeep)) // if keeping reports
        {
            $where = "period NOT IN (" . implode(',', $this->reportPeriodsToKeep) . ")";

            // if not keeping segments make sure segments w/ kept periods are also deleted
            if (!$this->keepSegmentReports) {
                $this->findSegmentArchives($oldNumericTables);

                $dateFromTable = ArchiveTableCreator::getDateFromTableName($table);

                if (!empty($this->segmentArchiveIds[$dateFromTable])) {
                    $archiveIds = $this->segmentArchiveIds[$dateFromTable];
                    $where     .= " OR idarchive IN (" . implode(',', $archiveIds) . ")";
                }
            }

            $where = "($where)";
        }
        return $where;
    }
private function getBlobTableWhereExpr($oldNumericTables, $table)
    {
        $where = "";
        if (!empty($this->reportPeriodsToKeep)) // if keeping reports
        {
            $where = "period NOT IN (" . implode(',', $this->reportPeriodsToKeep) . ")";

            // if not keeping segments make sure segments w/ kept periods are also deleted
            if (!$this->keepSegmentReports) {
                $this->findSegmentArchives($oldNumericTables);

                $dateFromTable = ArchiveTableCreator::getDateFromTableName($table);

                if (!empty($this->segmentArchiveIds[$dateFromTable])) {
                    $archiveIds = $this->segmentArchiveIds[$dateFromTable];
                    $where     .= " OR idarchive IN (" . implode(',', $archiveIds) . ")";
                }
            }

            $where = "($where)";
        }
        return $where;
    }
private function getBlobTableWhereExpr ( $ oldNumericTables , $ table ) { $ where = "" ; if ( ! empty ( $ this -> reportPeriodsToKeep ) ) // if keeping reports { $ where = "period NOT IN (" . implode ( ',' , $ this -> reportPeriodsToKeep ) . ")" ; // if not keeping segments make sure segments w/ kept periods are also deleted if ( ! $ this -> keepSegmentReports ) { $ this -> findSegmentArchives ( $ oldNumericTables ) ; $ dateFromTable = ArchiveTableCreator :: getDateFromTableName ( $ table ) ; if ( ! empty ( $ this -> segmentArchiveIds [ $ dateFromTable ] ) ) { $ archiveIds = $ this -> segmentArchiveIds [ $ dateFromTable ] ; $ where .= " OR idarchive IN (" . implode ( ',' , $ archiveIds ) . ")" ; } } $ where = "($where)" ; } return $ where ; }
Returns SQL WHERE expression used to find reports that should be purged.
Returns SQL WHERE expression used to find reports that should be purged .