Retour de Select incomplet
Bonjour à tous,
Nouveau soucis avec une requete pourtant simple :
L'affichage me retourne toutes mes données sauf une ! Et ce pour les 2 colonnes concernées :
Code:
1 2 3 4 5 6 7 8 9
| <?php
mysql_select_db($database_intranetCE, $intranetCE);
$sql = "SELECT titre_doc FROM document WHERE type_document like 'Catalogue'";
$catalogue = mysql_query($sql, $intranetCE) or die(mysql_error());
$row_catalogue = mysql_fetch_assoc($catalogue);
$sql2 = "SELECT titre_doc FROM document WHERE type_document like 'Circulaire'";
$circulaire= mysql_query($sql2, $intranetCE) or die(mysql_error());
$row_circulaire = mysql_fetch_assoc($circulaire);
?> |
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <table width="96%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center"><strong>CIRCULAIRES</strong></div></td>
<td><div align="center"><strong>CATALOGUES</strong></div></td>
</tr>
<tr>
<td><?php do {
print ($circ['titre_doc']).'<br />'; }
while ($circ = mysql_fetch_assoc($circulaire)) ?>
</td>
<td><?php do {
print($cat['titre_doc']).'<br />'; }
while ($cat = mysql_fetch_assoc($catalogue)) ?>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table> |
Il s'agit donc bien s'un select sur une seule table pour afficher dans mon tableau d'un côté tous les catalogues, de l'autre toutes les circulaires. Et bien en affichage, j'ai un total de 10 circulaires alors que j'en ai 11 dans la table et idem pour les catalogues (7 pour 8 dans la table !)
Si quelqu'un à une idée...:roll: