<?php class UnitMeasure_Master
	{
 		public function UnitMeasure_Master()  
		{
		 
		}
		   function  UnitMeasure($sid,$title)
		   { 
		    
					global $db;
					$query=DB_query("SELECT unitid  ,unitname   FROM  unitsofmeasure order by unitname ",$db);		
					if(!$query)
					{
					   die('Error.'.DB_error_msg($db));
					}
					echo "<select name='".$title."' id='".$title."'    >";
					echo "<option value='000'>---</option>";
					while($row=DB_fetch_array($query))
					{
					   $p='';
					   if($row['unitid']==$sid)
					   $p='selected';
					  echo "<option value='".$row['unitid']."' $p >".$row['unitname']."</option>";
					}
					echo "</select>";
			}
			
			
			
		 
	}
	
	$ClassUnitMeasure=new UnitMeasure_Master();
	?>
