<?php

	class ExtendedPropertiesModel {

		public function getEPropIdFromName( $name ) {
			$query = sprintf( "select extended_property_id from extended_properties where ep_name='%s'",
				FNTH_db_addslashes( $name ) );
			return FNTH_db_get_field( $query , "extended_property_id" );
		}

		public function getEPropLangdefFromName( $language_id , $name ) {
			$query = sprintf( "select langdef_name from extended_property_langdefs where extended_property_id in (select extended_property_id from extended_properties where ep_name='%s' and language_id=%d)",
				FNTH_db_addslashes( $name ),$language_id );
			return FNTH_db_get_field( $query , "langdef_name" );
		}

	}
?>
