ho provato a fare così:
ma mi restit questo errore:Codice PHP:
$sql="SELECT * from (".$tab['nome_tabella'].") ";
$risultato=mysql_query($sql);
if(mysql_num_rows($risultato)>0){
while($riga = mysql_fetch_array($risultato)){
echo "numero camere: $riga[n_s] prezzo per ogni camera: $riga[p_s]
";
}
} else {
echo "non ci sono camere";
}
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\date2\ricerca.php on line 44