Magicale
Non posso saperlo se non posti il codice che hai usato
La query è corretta, o almeno, su MySqul 5.0.51b funziona correttamente (non mi sono ancora aggiornato all'ultima versione)
Tu quale stai utilizzando?
Ciao Alessandro, la versione è 5.1.6
Il codice è il seguente:
<?
*$query_proposta="SELECT * FROM immobile WHERE abilitato='s' AND proposta='vendita' ORDER BY RAND(TO_DAYS(NOW())1+HOUR(NOW()) LIMIT 10";
$result_vendita=mysql_query($query_vendita) or die ($query_vendita);
$numero=mysql_num_rows($result_vendita);
?>
<?
if ($numero>0) {
while ($row_vendita=mysql_fetch_array($result_vendita))
{
$query_vend2="SELECT * FROM immagine WHERE id_immobile=$row_vendita[id] ORDER BY 'id' DESC";
$result_vend2=mysql_query($query_vend2) or die ($query_vend2);
$row_vend2=mysql_fetch_array($result_vend2);
**$query_vend3="SELECT * FROM provincia WHERE id=$row_vendita[provincia]";**
**$result_vend3=mysql_query($query_vend3) or die ($query_vend3);**
**$row_vend3=mysql_fetch_array($result_vend3);**
**$provincia=$row_vend3[sigla];**
**$query_vend4="SELECT * FROM comune WHERE id=$row_vendita[comune]";**
**$result_vend4=mysql_query($query_vend4) or die ($query_vend4);**
**$row_vend4=mysql_fetch_array($result_vend4);**
**$comune=$row_vend4[nome_comune];**
**$comune1=str_replace(" ", "_",$comune);**
**$comune2=str_replace("'", "_",$comune1);**
**$typo1=str_replace(" ", "_",$row_vendita[tipologia]);**
**$typo2=str_replace("'", "_",$typo1);**
**$typo3=str_replace(" ", "-",$row_vendita[tipologia]);**
**$typo4=str_replace("'", "-",$typo3); ?>**
Grazie anticipatamente.