<?php
	require ('../../conn.php');
	
	$afelegido3 = $_POST['afelegido3'];
	
	$query = "select distinct a.pkyFixedAssetCategory as cod, a.fldName as categoria
	from
	fasFixedAssetCategory a, fasFixedAssetClassification b
	where
	a.pkyFixedAssetCategory = b.codSubGroup and
	b.codGroup = '$afelegido3' and
	a.sysEnabled = 1 and a.sysAuthorized = 1
	order by categoria";
	$resultado3=$mysqli->query($query);

	$html= "<option value='0'>Todos</option>";
	
	while($row = $resultado3->fetch_assoc())
	{
		$html.= "<option value='".$row['cod']."'>".$row['cod'].' - '.$row['categoria']."</option>";
	}
	echo $html;
?>