PESSOAL ESTOU COM PROBLEMA AQUI PARA GERAR UMAS TAGS AGRUPADAS!! SEGUE ABAIXO O PROBLEMA:
TABELA TAGS
ID - ID_MARCADOR - ID_POSTAGEM
ONDE:
ID- AUTONUMERADOS
ID_MARCADOR - VEM DA TABELA MARCADORES
ID_POSTAGEM - VEM DA TABELA BLOG
NO BANCO DE DADOS ESTÁ ASSIM
1 - 8 - 3
2 - 9 - 3
3 - 11 - 3
--------------------
4 - 8 - 4
5 - 9 - 4
6 - 12 - 4
-------------------------------------
ESTOU TENTANDO AGRUPAR PARA QUE APAREÇA AS TAGS PARA AS POSTAGENS
ESTÁ APARECENDO ASSIM:
8(2) 9(2) 11(2) 12(2)
É PARA APERECER ASSIM:
8(2) 9(2) 11(1) 12(1)
SEGUE ABAIXO O MEU CÓDIGO:
<CODE>
<aside class="widget widget_tags">
<h4 class="widget-title">Marcadores</h4>
<ul>
<?php
$SQL1 = "SELECT * FROM tags GROUP BY id_marcador ORDER BY id";
$query1 = mysql_query($SQL1);
while($row1 = mysql_fetch_array($query1)) {
$id_tag = $row1['id_marcador'];
?>
<?php
$somar = mysql_query("SELECT COUNT(id) as Total FROM tags GROUP BY id_marcador");
$totalid = mysql_fetch_array($somar);
?>
<li><a href="blog_marcadores.php?id=<? echo $id;?>"><? echo $id_tag; ?>( <? echo $totalid['Total']; ?> )</a></li>
<?
}
?>
</ul>
</aside>
</CODE>
Ninguém!!
Dúvida Em Tags
Started By claytonprog, 05/01/2013, 14:57
Nenhuma resposta neste tópico
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)