1 order by mt.potenza, mt.prezzo ";
$sql_result_count_benzina=mysql_query($sql_count_benzina, $connection) or die(mysql_error());
$ValoriCountBenzina = mysql_fetch_array($sql_result_count_benzina);
$sql_count_diesel="select count(*) diesel from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.carburante='DIE' and mt.fuorip<>1 order by mt.potenza, mt.prezzo ";
$sql_result_count_diesel=mysql_query($sql_count_diesel, $connection) or die(mysql_error());
$ValoriCountDiesel = mysql_fetch_array($sql_result_count_diesel);
$sql_count_altro="select count(*) altro from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.carburante not in ('B','DIE') and mt.fuorip<>1 order by mt.potenza, mt.prezzo ";
$sql_result_count_altro=mysql_query($sql_count_altro, $connection) or die(mysql_error());
$ValoriCountAltro = mysql_fetch_array($sql_result_count_altro);
$sql_count_fuorip="select count(*) fuorip from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.fuorip=1 order by mt.potenza, mt.prezzo ";
$sql_result_count_fuorip=mysql_query($sql_count_fuorip, $connection) or die(mysql_error());
$ValoriCountFuorip = mysql_fetch_array($sql_result_count_fuorip);
$sql_marche_benzina="select md.id, md.modello, mt.prezzo, mt.cilindrata, mt.cilindri, mt.carburante, mt.potenza, mt.coppia, mt.potenzagiri, mt.coppiagiri, mt.trazione, mt.massa, mt.velmax, mt.zero_cento, mt.ccomplessivo peso_pot from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.carburante='B' and mt.fuorip<>1 order by mt.potenza, mt.prezzo ";
$sql_result_marche_benzina=mysql_query($sql_marche_benzina, $connection) or die(mysql_error());
$sql_marche_diesel="select md.id, md.modello, mt.prezzo, mt.cilindrata, mt.cilindri, mt.carburante, mt.potenza, mt.coppia, mt.potenzagiri, mt.coppiagiri, mt.trazione, mt.massa, mt.velmax, mt.zero_cento, mt.ccomplessivo peso_pot from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.carburante='DIE' and mt.fuorip<>1 order by mt.potenza, mt.prezzo ";
$sql_result_marche_diesel=mysql_query($sql_marche_diesel, $connection) or die(mysql_error());
$sql_marche_altre="select md.id, md.modello, mt.prezzo, mt.cilindrata, mt.cilindri, mt.carburante, mt.potenza, mt.coppia, mt.potenzagiri, mt.coppiagiri, mt.trazione, mt.massa, mt.velmax, mt.zero_cento, mt.ccomplessivo peso_pot from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.carburante not in ('B','DIE') and mt.fuorip<>1 order by mt.potenza, mt.prezzo ";
$sql_result_marche_altre=mysql_query($sql_marche_altre, $connection) or die(mysql_error());
$sql_marche_fuorip="select md.id, md.modello, mt.prezzo, mt.cilindrata, mt.cilindri, mt.carburante, mt.potenza, mt.coppia, mt.potenzagiri, mt.coppiagiri, mt.trazione, mt.massa, mt.velmax, mt.zero_cento, mt.ccomplessivo peso_pot from cms_modello md, cms_motorizz mt where md.id_marca = $id_serie and md.id=mt.id_modello and mt.fuorip=1 order by mt.potenza, mt.prezzo ";
$sql_result_marche_fuorip=mysql_query($sql_marche_fuorip, $connection) or die(mysql_error());
//QUERY PRINCIPALE
?>