public static function findByKey($nb_catalog, $key)
    {
        $nb_catalog_id = nb_getMixedValue($nb_catalog, 'nb_catalog_id');
        if (is_numeric($nb_catalog_id)) {
            $retval = CNabuCatalogTag::buildObjectFromSQL(
                    'select * '
                    . 'from nb_catalog_tag '
                   . 'where nb_catalog_id=%catalog_id$d '
                     . "and nb_catalog_tag_key='%key\$s'",
                    array(
                        'catalog_id' => $nb_catalog_id,
                        'key' => $key
                    )
            );
        } else {
            $retval = null;
        }
        
        return $retval;
    }
public static function findByKey($nb_catalog, $key)
    {
        $nb_catalog_id = nb_getMixedValue($nb_catalog, 'nb_catalog_id');
        if (is_numeric($nb_catalog_id)) {
            $retval = CNabuCatalogTag::buildObjectFromSQL(
                    'select * '
                    . 'from nb_catalog_tag '
                   . 'where nb_catalog_id=%catalog_id$d '
                     . "and nb_catalog_tag_key='%key\$s'",
                    array(
                        'catalog_id' => $nb_catalog_id,
                        'key' => $key
                    )
            );
        } else {
            $retval = null;
        }
        
        return $retval;
    }
public static function findByKey ( $ nb_catalog , $ key ) { $ nb_catalog_id = nb_getMixedValue ( $ nb_catalog , 'nb_catalog_id' ) ; if ( is_numeric ( $ nb_catalog_id ) ) { $ retval = CNabuCatalogTag :: buildObjectFromSQL ( 'select * ' . 'from nb_catalog_tag ' . 'where nb_catalog_id=%catalog_id$d ' . "and nb_catalog_tag_key='%key\$s'" , array ( 'catalog_id' => $ nb_catalog_id , 'key' => $ key ) ) ; } else { $ retval = null ; } return $ retval ; }
Find an instance identified by nb_catalog_tag_key field.
@param mixed $nb_catalog Catalog that owns Catalog Tag
@param string $key Key to search
@return CNabuCatalogTag Returns a valid instance if exists or null if not.
Find an instance identified by nb_catalog_tag_key field .