<?php
	require ('../../conn.php');
	
	$elegido3 = $_POST['elegido3'];
	
	$query = "select distinct a.pkyItemCategory as cod, a.fldName as categoria
	from
	invItemCategory a, invItemClassification b
	where
	a.pkyItemCategory = b.codSubGroup and
	b.codGroup = '$elegido3' 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;
?>