Bonjours, je cherche comment je pourrais faire pour rassembler les 3 requetes select en une seule, mais j'ai un peu de mal. Avez vous une idée? Merci
// Download type 1.
$downloadquery = doquery("SELECT * FROM {{table}} WHERE type='1'", "download");
$downloadrow = 0;
$page['type1'] ='';
while ($downloadrow = mysql_fetch_array($downloadquery))
{
$page['type1'] .='<div class="bloc_rose"><div style="float:left"><a href="#" onmouseover="montre(\'<img src='.$downloadrow['image'].'>\');" onmouseout="cache();"><img src="'.$downloadrow['image'].'" alt="'.$downloadrow['title'].'" style="height:40px; width:40px" class="no_bordure"></a></div><a href="?do=download&id='.$downloadrow['id'].'"><b><span class="mauve2">'.$downloadrow['title'].'</span></b></a> - <i>Téléchargé: <span class="mauve1">'.$downloadrow['count'].'</span> fois</i><br><span class="taille1">'.$downloadrow['content'].'</span></div><br>';
}
// Download type 2.
$downloadquery = doquery("SELECT * FROM {{table}} WHERE type='2'", "download");
$downloadrow = 0;
$page['type2'] ='';
while ($downloadrow = mysql_fetch_array($downloadquery))
{
$page['type2'] .='<div class="bloc_rose"><div style="float:left"><a href="#" onmouseover="montre(\'<img src='.$downloadrow['image'].'>\');" onmouseout="cache();"><img src="'.$downloadrow['image'].'" alt="'.$downloadrow['title'].'" style="height:40px; width:40px" class="no_bordure"></a></div><a href="'.$downloadrow['url'].'"><b><span class="mauve2">'.$downloadrow['title'].'</span></b></a> - <i>Téléchargé: <span class="mauve1">'.$downloadrow['count'].'</span> fois</i><br><span class="taille1">'.$downloadrow['content'].'</span></div><br>';
}
// Download type 3.
$downloadquery = doquery("SELECT * FROM {{table}} WHERE type='3'", "download");
$downloadrow = 0;
$page['type3'] ='';
while ($downloadrow = mysql_fetch_array($downloadquery))
{
$page['type3'] .='<div class="bloc_rose"><div style="float:left"><a href="#" onmouseover="montre(\'<img src='.$downloadrow['image'].'>\');" onmouseout="cache();"><img src="'.$downloadrow['image'].'" alt="'.$downloadrow['title'].'" style="height:40px; width:40px" class="no_bordure"></a></div><a href="'.$downloadrow['url'].'"><b><span class="mauve2">'.$downloadrow['title'].'</span></b></a> - <i>Téléchargé: <span class="mauve1">'.$downloadrow['count'].'</span> fois</i><br><span class="taille1">'.$downloadrow['content'].'</span></div><br>';
}
// Download type 1.
$downloadquery = doquery("SELECT * FROM {{table}} WHERE type='1'", "download");
$downloadrow = 0;
$page['type1'] ='';
while ($downloadrow = mysql_fetch_array($downloadquery))
{
$page['type1'] .='<div class="bloc_rose"><div style="float:left"><a href="#" onmouseover="montre(\'<img src='.$downloadrow['image'].'>\');" onmouseout="cache();"><img src="'.$downloadrow['image'].'" alt="'.$downloadrow['title'].'" style="height:40px; width:40px" class="no_bordure"></a></div><a href="?do=download&id='.$downloadrow['id'].'"><b><span class="mauve2">'.$downloadrow['title'].'</span></b></a> - <i>Téléchargé: <span class="mauve1">'.$downloadrow['count'].'</span> fois</i><br><span class="taille1">'.$downloadrow['content'].'</span></div><br>';
}
// Download type 2.
$downloadquery = doquery("SELECT * FROM {{table}} WHERE type='2'", "download");
$downloadrow = 0;
$page['type2'] ='';
while ($downloadrow = mysql_fetch_array($downloadquery))
{
$page['type2'] .='<div class="bloc_rose"><div style="float:left"><a href="#" onmouseover="montre(\'<img src='.$downloadrow['image'].'>\');" onmouseout="cache();"><img src="'.$downloadrow['image'].'" alt="'.$downloadrow['title'].'" style="height:40px; width:40px" class="no_bordure"></a></div><a href="'.$downloadrow['url'].'"><b><span class="mauve2">'.$downloadrow['title'].'</span></b></a> - <i>Téléchargé: <span class="mauve1">'.$downloadrow['count'].'</span> fois</i><br><span class="taille1">'.$downloadrow['content'].'</span></div><br>';
}
// Download type 3.
$downloadquery = doquery("SELECT * FROM {{table}} WHERE type='3'", "download");
$downloadrow = 0;
$page['type3'] ='';
while ($downloadrow = mysql_fetch_array($downloadquery))
{
$page['type3'] .='<div class="bloc_rose"><div style="float:left"><a href="#" onmouseover="montre(\'<img src='.$downloadrow['image'].'>\');" onmouseout="cache();"><img src="'.$downloadrow['image'].'" alt="'.$downloadrow['title'].'" style="height:40px; width:40px" class="no_bordure"></a></div><a href="'.$downloadrow['url'].'"><b><span class="mauve2">'.$downloadrow['title'].'</span></b></a> - <i>Téléchargé: <span class="mauve1">'.$downloadrow['count'].'</span> fois</i><br><span class="taille1">'.$downloadrow['content'].'</span></div><br>';
}