$querybvnewspp = "SELECT prima1,prima2,prima3,prima4,prima5,prima6, prima7, prima8, prima9 FROM sito where id='1'";
$resultbvnewspp = @mysql_query($querybvnewspp, $db);
$rowbvbnewsnewspp = @mysql_fetch_array($resultbvnewspp);
$querybv = "SELECT * FROM news where stato='si' and (id='$rowbvbnewsnewspp[prima1]' or id='$rowbvbnewsnewspp[prima2]' or id='$rowbvbnewsnewspp[prima3]' or id='$rowbvbnewsnewspp[prima4]' or id='$rowbvbnewsnewspp[prima5]') LIMIT 5";
$resultbv = mysql_query($querybv, $db);
while ($rowbvb = mysql_fetch_array($resultbv))
{
$querybvcaca = "SELECT nomecategoria,tipologia FROM categoria where id='$rowbvb[tipologia]'";
$resultbvcaca = mysql_query($querybvcaca, $db);
$rowbvbcaca = mysql_fetch_array($resultbvcaca);
?>
}?>
$querybv = "SELECT * FROM news where stato='si' and (id='$rowbvbnewsnewspp[prima6]' or id='$rowbvbnewsnewspp[prima7]' or id='$rowbvbnewsnewspp[prima8]' or id='$rowbvbnewsnewspp[prima9]') ORDER BY data DESC LIMIT 4";
$resultbv = mysql_query($querybv, $db);
while ($rowbvb = mysql_fetch_array($resultbv))
{
$querybvcaca = "SELECT nomecategoria,tipologia FROM categoria where id='$rowbvb[tipologia]'";
$resultbvcaca = mysql_query($querybvcaca, $db);
$rowbvbcaca = mysql_fetch_array($resultbvcaca);
?>