src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemShopAttributeNumeric.class.php
protected function GetSQLQueryForQueryRestrictionForActiveFilter()
    {
        $dStartValue = $this->GetActiveStartValue();
        $dEndValue = $this->GetActiveEndValue();
        $sQuery = '';
        if (false !== $dStartValue && false !== $dEndValue) {
            $sEscapedTargetTable = MySqlLegacySupport::getInstance()->real_escape_string($this->sItemTableName);
            $sEscapedTargetMLTTable = MySqlLegacySupport::getInstance()->real_escape_string('shop_article_'.$this->sItemTableName.'_mlt');
            $oShopAttribute = $this->GetFieldShopAttribute();

            $sQuery = "SELECT `{$sEscapedTargetMLTTable}`.*
                     FROM `{$sEscapedTargetTable}`
               INNER JOIN `{$sEscapedTargetMLTTable}` ON `{$sEscapedTargetTable}`.`id` = `{$sEscapedTargetMLTTable}`.`target_id`
                    WHERE ".$this->GetTargetTableNameField().' >= '.MySqlLegacySupport::getInstance()->real_escape_string($dStartValue).'
                      AND '.$this->GetTargetTableNameField().' <= '.MySqlLegacySupport::getInstance()->real_escape_string($dEndValue)."
                      AND `{$sEscapedTargetTable}`.`shop_attribute_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oShopAttribute->id)."'";
        }

        return $sQuery;
    }
protected function GetSQLQueryForQueryRestrictionForActiveFilter()
    {
        $dStartValue = $this->GetActiveStartValue();
        $dEndValue = $this->GetActiveEndValue();
        $sQuery = '';
        if (false !== $dStartValue && false !== $dEndValue) {
            $sEscapedTargetTable = MySqlLegacySupport::getInstance()->real_escape_string($this->sItemTableName);
            $sEscapedTargetMLTTable = MySqlLegacySupport::getInstance()->real_escape_string('shop_article_'.$this->sItemTableName.'_mlt');
            $oShopAttribute = $this->GetFieldShopAttribute();

            $sQuery = "SELECT `{$sEscapedTargetMLTTable}`.*
                     FROM `{$sEscapedTargetTable}`
               INNER JOIN `{$sEscapedTargetMLTTable}` ON `{$sEscapedTargetTable}`.`id` = `{$sEscapedTargetMLTTable}`.`target_id`
                    WHERE ".$this->GetTargetTableNameField().' >= '.MySqlLegacySupport::getInstance()->real_escape_string($dStartValue).'
                      AND '.$this->GetTargetTableNameField().' <= '.MySqlLegacySupport::getInstance()->real_escape_string($dEndValue)."
                      AND `{$sEscapedTargetTable}`.`shop_attribute_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oShopAttribute->id)."'";
        }

        return $sQuery;
    }
protected function GetSQLQueryForQueryRestrictionForActiveFilter ( ) { $ dStartValue = $ this -> GetActiveStartValue ( ) ; $ dEndValue = $ this -> GetActiveEndValue ( ) ; $ sQuery = '' ; if ( false !== $ dStartValue && false !== $ dEndValue ) { $ sEscapedTargetTable = MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ this -> sItemTableName ) ; $ sEscapedTargetMLTTable = MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( 'shop_article_' . $ this -> sItemTableName . '_mlt' ) ; $ oShopAttribute = $ this -> GetFieldShopAttribute ( ) ; $ sQuery = "SELECT `{$sEscapedTargetMLTTable}`.*
                     FROM `{$sEscapedTargetTable}`
               INNER JOIN `{$sEscapedTargetMLTTable}` ON `{$sEscapedTargetTable}`.`id` = `{$sEscapedTargetMLTTable}`.`target_id`
                    WHERE " . $ this -> GetTargetTableNameField ( ) . ' >= ' . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ dStartValue ) . '
                      AND ' . $ this -> GetTargetTableNameField ( ) . ' <= ' . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ dEndValue ) . "
                      AND `{$sEscapedTargetTable}`.`shop_attribute_id` = '" . MySqlLegacySupport :: getInstance ( ) -> real_escape_string ( $ oShopAttribute -> id ) . "'" ; } return $ sQuery ; }
builds the sql query for the GetItemName method that is usual used as callback in the GetOptions method
we only want to show results that are values of the selected shop attribute in the filter item.

@return string
builds the sql query for the GetItemName method that is usual used as callback in the GetOptions method we only want to show results that are values of the selected shop attribute in the filter item .