kernel/classes/ezuserdiscountrule.php
static function &fetchByUserIDArray( $idArray )
    {
        $db = eZDB::instance();
        $inString = $db->generateSQLINStatement( $idArray, 'ezuser_discountrule.contentobject_id', false, false, 'int' );
        $query = "SELECT DISTINCT ezdiscountrule.id,
                                  ezdiscountrule.name
                  FROM ezdiscountrule,
                       ezuser_discountrule
                  WHERE $inString AND
                        ezuser_discountrule.discountrule_id = ezdiscountrule.id";
        $ruleArray = $db->arrayQuery( $query );

        $rules = array();
        foreach ( $ruleArray as $ruleRow )
        {
            $rules[] = new eZDiscountRule( $ruleRow );
        }
        return $rules;
    }
static function &fetchByUserIDArray( $idArray )
    {
        $db = eZDB::instance();
        $inString = $db->generateSQLINStatement( $idArray, 'ezuser_discountrule.contentobject_id', false, false, 'int' );
        $query = "SELECT DISTINCT ezdiscountrule.id,
                                  ezdiscountrule.name
                  FROM ezdiscountrule,
                       ezuser_discountrule
                  WHERE $inString AND
                        ezuser_discountrule.discountrule_id = ezdiscountrule.id";
        $ruleArray = $db->arrayQuery( $query );

        $rules = array();
        foreach ( $ruleArray as $ruleRow )
        {
            $rules[] = new eZDiscountRule( $ruleRow );
        }
        return $rules;
    }
static function & fetchByUserIDArray ( $ idArray ) { $ db = eZDB :: instance ( ) ; $ inString = $ db -> generateSQLINStatement ( $ idArray , 'ezuser_discountrule.contentobject_id' , false , false , 'int' ) ; $ query = "SELECT DISTINCT ezdiscountrule.id,
                                  ezdiscountrule.name
                  FROM ezdiscountrule,
                       ezuser_discountrule
                  WHERE $inString AND
                        ezuser_discountrule.discountrule_id = ezdiscountrule.id" ; $ ruleArray = $ db -> arrayQuery ( $ query ) ; $ rules = array ( ) ; foreach ( $ ruleArray as $ ruleRow ) { $ rules [ ] = new eZDiscountRule ( $ ruleRow ) ; } return $ rules ; }
Fetches the eZDiscountRules matching an array of eZUserID

@param array(eZUserID) $idArray Array of user ID

@return array(eZDiscountRule)
Fetches the eZDiscountRules matching an array of eZUserID