Exemplo n.º 1
0
 public static function countActiveLanguages()
 {
     if (!self::$countActiveLanguages) {
         self::$countActiveLanguages = Db::getInstance()->getValue('SELECT COUNT(*) FROM `' . _DB_PREFIX_ . 'lang` WHERE `active` = 1');
     }
     return self::$countActiveLanguages;
 }
Exemplo n.º 2
0
    public static function countActiveLanguages()
    {
        if (!self::$countActiveLanguages) {
            self::$countActiveLanguages = Db::getInstance()->getValue('
				SELECT COUNT(DISTINCT l.id_lang) FROM `' . _DB_PREFIX_ . 'lang` l
				' . Shop::addSqlAssociation('lang', 'l') . '
				WHERE l.`active` = 1
			');
        }
        return self::$countActiveLanguages;
    }