<?php
	require ('../../conn.php');
	
	$afelegido1 = $_POST['afelegido1'];
	
	$query1 = "select distinct a.pkyFixedAssetCategory as cod, a.fldName as categoria
	from
	fasFixedAssetCategory a, fasFixedAssetClassification b
	where
	a.pkyFixedAssetCategory = b.codSubFamily and
	b.codFamily = '$afelegido1' and
	a.sysEnabled = 1 and a.sysAuthorized = 1 
	order by categoria";
	$resultado1 = $mysqli->query($query1);
	
	$html= "<option value='0'>Todos</option>";
	
	while($row = $resultado1->fetch_assoc())
	{
		$html.= "<option value='".$row['cod']."'>".$row['cod'].' - '.$row['categoria']."</option>";
	}
	
	echo $html;
?>		