public function getSegmentHashesByIdSite()
    {
        //Get a list of hashes of all segments that exist now
        $sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common::prefixTable('segment')
            . " WHERE deleted = 0";
        $rows = Db::fetchAll($sql);
        $segmentHashes = array();
        foreach ($rows as $row) {
            $idSite = (int)$row['enable_only_idsite'];
            if (! isset($segmentHashes[$idSite])) {
                $segmentHashes[$idSite] = array();
            }
            $segmentHashes[$idSite][] = Segment::getSegmentHash($row['definition']);
        }

        return $segmentHashes;
    }
public function getSegmentHashesByIdSite()
    {
        //Get a list of hashes of all segments that exist now
        $sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common::prefixTable('segment')
            . " WHERE deleted = 0";
        $rows = Db::fetchAll($sql);
        $segmentHashes = array();
        foreach ($rows as $row) {
            $idSite = (int)$row['enable_only_idsite'];
            if (! isset($segmentHashes[$idSite])) {
                $segmentHashes[$idSite] = array();
            }
            $segmentHashes[$idSite][] = Segment::getSegmentHash($row['definition']);
        }

        return $segmentHashes;
    }
public function getSegmentHashesByIdSite ( ) { //Get a list of hashes of all segments that exist now $ sql = "SELECT DISTINCT definition, enable_only_idsite FROM " . Common :: prefixTable ( 'segment' ) . " WHERE deleted = 0" ; $ rows = Db :: fetchAll ( $ sql ) ; $ segmentHashes = array ( ) ; foreach ( $ rows as $ row ) { $ idSite = ( int ) $ row [ 'enable_only_idsite' ] ; if ( ! isset ( $ segmentHashes [ $ idSite ] ) ) { $ segmentHashes [ $ idSite ] = array ( ) ; } $ segmentHashes [ $ idSite ] [ ] = Segment :: getSegmentHash ( $ row [ 'definition' ] ) ; } return $ segmentHashes ; }
Get a list of all segment hashes that currently exist, indexed by idSite.
@return array
Get a list of all segment hashes that currently exist indexed by idSite .