1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| foreach($xml->BIEN as $bien) {
while($entre = mysql_fetch_object($exec))
{
if($entre->BIEN_NUM_ASP == $bien->NO_ASP && ($bien->QUARTIER!="" && substr($bien->CP_OFFRE,0,2) == '75'))
{
$req = "select LOCAL_ID,LOCAL_QUARTIER,LOCAL_VILLE from localisation where LOCAL_CP =".$bien->CP_OFFRE." and LOCAL_QUARTIER = ".$bien->QUARTIER;
$exec2 = mysql_query($req) or die("erreur dans la requete($req)");
$tab = mysql_fetch_object($exec2);
while($sql = $tab)
{
echo $tab->LOCAL_ID.' '.$tab->LOCAL_QUARTIER.' '.$tab->LOCAL_VILLE;
}
}
else if($entre->BIEN_NUM_ASP == $bien->NO_ASP)
{
$req = "select LOCAL_ID,LOCAL_VILLE from localisation where LOCAL_CP =".$bien->CP_OFFRE." AND LOCAL_QUARTIER = ''";
$exec3 = mysql_query($req) or die("erreur dans la requete($req)");
while($sql = mysql_fetch_object($exec3))
{
echo $entre->LOCAL_ID;
} } } |
Partager