답변 1개 / 댓글 4개
채택된 답변
+20 포인트
Copy
$sql = "
select ct_tag, count(*) as cnt
from comp_tag
where bo_table = '{$bo_table}'
group by ct_tag
order by 2 desc
";
$result = sql_query($sql);
echo '<ul>';
while ($row = sql_fetch_array($result)) {
echo '<li>';
echo "{$row['ct_tag']} ({$row['cnt']})";
echo '</li>';
}
echo '</ul>';
답변에 대한 댓글 4개
답변을 작성하려면 로그인이 필요합니다.
