Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/11/2007, 15:26
Chemix
 
Fecha de Ingreso: mayo-2003
Mensajes: 92
Antigüedad: 21 años
Puntos: 0
Re: Sistema tag-cloud

Hola,.. he creado la tabla dentro de "tags" con el id de la categoria donde debe de imprimirse

Código PHP:
CREATE TABLE `tags` (
  `
id_tagint(11NOT NULL auto_increment,
  `
idint(11NOT NULL default '0',
  `
tagvarchar(100collate utf8_unicode_ci NOT NULL default '',
  `
relevanciaint(11NOT NULL default '0',
  
PRIMARY KEY  (`id_tag`)
ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=57 
Ahora deberia de hacer la consulta aqui

Código PHP:
function get_tag_data() { 
$result mysql_query("SELECT * FROM tags GROUP BY tag ORDER BY relevancia DESC"); 
while(
$row mysql_fetch_array($result)) { 
$arr[$row['tag']] = $row['relevancia'];

ksort($arr); 
return 
$arr

a ver si me dais una manita