Recent Topics

1 Jun 08, 2008 11:44    

My b2evolution Version: Not Entered

Hello,

On my blog, I tested tag cloud (from core) and real tag cloud (plugins from tears); The results are differents. SO I made manually both sql requests.

http://slamp.free.fr/b2evo/tagcloud.png

SQL request for CORE

SELECT LOWER(tag_name) AS tag_name, COUNT(itag_itm_ID) AS tag_count
  FROM evo_items__tag 
    INNER JOIN evo_items__itemtag ON itag_tag_ID = tag_ID
    INNER JOIN evo_postcats ON itag_itm_ID = postcat_post_ID
    INNER JOIN evo_categories ON postcat_cat_ID = cat_ID
  WHERE cat_blog_ID = 1
  GROUP BY tag_name
  ORDER BY tag_count DESC
  LIMIT 30;

SQL request for real tad cloud plugin

SELECT count(*) AS tag_total, tag_name
  FROM evo_items__itemtag 
  JOIN ( evo_items__tag ) ON ( itag_tag_ID = tag_ID ) 
  JOIN ( evo_items__item ) ON ( itag_itm_ID = post_ID )
  JOIN ( evo_categories ) ON ( cat_ID = post_main_cat_ID )
  WHERE cat_blog_ID = 1
  GROUP BY tag_ID 
  ORDER BY tag_total DESC 
  LIMIT 30

How can I explain thoses differences ?


Form is loading...