where句をいくつかの異なる場所に配置しようとしましたが、これを理解できません。すでに寄せられた質問を読みましたが、これまでのところ修正されていません。for が欲しいのCOUNT
ですitems.item_aprv='1'
が、どこに置いてもエラーになります。参照用に .php ファイル全体を含めました。
<?php
include 'header1.php';
?>
<div id="templatemo_main">
<div id="content_full" class="float_r">
<br><h10>Browse Mints</h10><br><br>
<?php
$search="SELECT mint.*, COUNT(items.item_id) as total
FROM mint
LEFT JOIN items ON mint.mint_id=items.item_mint
GROUP BY mint_id
ORDER BY `mint_name` ASC ;";
$items=mysql_query($search);
while($it=mysql_fetch_array($items)) {
?>
<div class="mint_box">
<h10 style="font-size:15px;">
<a href="mintitem.php?id=<?php echo $it['mint_id']; ?>">
<?php echo $it['mint_name']; ?>
</a> (<?php echo $it['total']; ?>)
</h10>
</div>
<?php
}
?>
<div class="cleaner h10"></div>
</div>
<?php
include 'footer.php';
?>