<?php
	
	require ('../../conn.php');
	
	$marcaelegido1 = $_POST['marcaelegido1'];
	
	$query1 = "select pkyBrandModel as cod, fldName as modelo 
	from invBrandModel 
	where 
	codBrand = '$marcaelegido1' and
	sysEnabled = 1 and sysAuthorized = 1
	order by fldName";
	$resultado1 = $mysqli->query($query1);
	
	$html= "<option value='0'>Todos</option>";
	
	while($row = $resultado1->fetch_assoc())
	{
		$html.= "<option value='".$row['cod']."'>".$row['cod'].' - '.$row['modelo']."</option>";
	}
	
	echo $html;
?>		