kernel/classes/ezvattype.php
static function fetchDependentProductsCount( $vatID )
    {
        $vatID = (int) $vatID; // prevent SQL injection

        // We need DISTINCT here since there might be several object translations.
        $query = "SELECT COUNT(DISTINCT coa.contentobject_id) AS count " .
                 "FROM ezcontentobject_attribute coa, ezcontentobject co " .
                 "WHERE " .
                 "coa.contentobject_id=co.id AND " .
                 "coa.version=co.current_version AND " .
                 "data_type_string IN ('ezprice', 'ezmultiprice') " .
                 "AND data_text LIKE '$vatID,%'";

        $db = eZDB::instance();
        $rslt = $db->arrayQuery( $query );
        $nProducts = $rslt[0]['count'];
        return $nProducts;
    }
static function fetchDependentProductsCount( $vatID )
    {
        $vatID = (int) $vatID; // prevent SQL injection

        // We need DISTINCT here since there might be several object translations.
        $query = "SELECT COUNT(DISTINCT coa.contentobject_id) AS count " .
                 "FROM ezcontentobject_attribute coa, ezcontentobject co " .
                 "WHERE " .
                 "coa.contentobject_id=co.id AND " .
                 "coa.version=co.current_version AND " .
                 "data_type_string IN ('ezprice', 'ezmultiprice') " .
                 "AND data_text LIKE '$vatID,%'";

        $db = eZDB::instance();
        $rslt = $db->arrayQuery( $query );
        $nProducts = $rslt[0]['count'];
        return $nProducts;
    }
static function fetchDependentProductsCount ( $ vatID ) { $ vatID = ( int ) $ vatID ; // prevent SQL injection // We need DISTINCT here since there might be several object translations. $ query = "SELECT COUNT(DISTINCT coa.contentobject_id) AS count " . "FROM ezcontentobject_attribute coa, ezcontentobject co " . "WHERE " . "coa.contentobject_id=co.id AND " . "coa.version=co.current_version AND " . "data_type_string IN ('ezprice', 'ezmultiprice') " . "AND data_text LIKE '$vatID,%'" ; $ db = eZDB :: instance ( ) ; $ rslt = $ db -> arrayQuery ( $ query ) ; $ nProducts = $ rslt [ 0 ] [ 'count' ] ; return $ nProducts ; }
Fetches number of products using given VAT type.

\public
\static
\param $vatID id of VAT type to count dependent products for.
\return Number of dependent products.
Fetches number of products using given VAT type .