0
ここに私の質問があります。topic_id = 27
をcat_id = 2
にどうやって得ることができますか?LEFT JOINの最後の入力を表示する
また、私ではない知識と私の英語:-)のためのID = 24
すべてのおかげで、と申し訳ありませんのような他の "新しい" トピック
$cat = $bdd->prepare('SELECT * from categories LEFT JOIN topics on topic_cat = cat_id group by cat_id limit 5 ');
$cat_show_list = $cat->execute();
echo '<table border="1">
<tr>
<th>5 Dernières catégories</th>
<th>Dernier topic</th>
</tr>';
while ($cat_show_list = $cat->fetch(PDO::FETCH_ORI_FIRST)){
echo '<tr>';
echo '<td class="#">';
echo '<h4><a href="category.php?id='. $cat_show_list['cat_id'].'">'. $cat_show_list['cat_name'].'</a></h4>'.'';
echo '<a> '.$cat_show_list['cat_description'] . '</a>';
echo '</td>';
echo '<td>'. $cat_show_list['topic_subject'];
echo '</tr>';
}
$cat->closeCursor();
コードを実際のコードとして投稿してください。 –
はい、申し訳ありません:) –