Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/03/2006, 14:03
Facha
 
Fecha de Ingreso: marzo-2005
Mensajes: 90
Antigüedad: 19 años, 1 mes
Puntos: 0
unir dos consultas

Hola todos necesito unir estas dos consultas:
necesito cargar en $row lo que me da en $result_CF(es un solo registro)
en definitiva deberia poder agregarle un registro mas al array $row. Espero me puedan ayudar. gracias

$sql="SELECT locationname.*, locations.* FROM locationname,locations
WHERE locationname.LocationsId=locations.LocationsId
AND locations.LocationParentId=0";
$result=mysql_query($sql)or die("º1º ".mysql_error());
$sql_CF="SELECT locationname.*, locations.*
FROM locationname,locations
WHERE locationname.LocationsId=locations.LocationsId
AND locations.LocationsId=2";

$result_CF=mysql_query($sql_CF)or die("º2º ".mysql_error());

echo "<select name=\"prov\" id=\"prov\" class=\"prodotto\">";
echo "<option selected value=\"0\">Seleccione ></option>";
// MIENTRAS HALLA REGISTROS LOS PRESENTO
while($row=mysql_fetch_array($result)){
echo "<option value=\"".$row['LocationsId']."\">".$row['LocationName']."</option>";

}
echo "</select>";