<verb name="doit" />
</verbs>
<body>
- <FreeQuery key="topicCounts" query=" SELECT count(c.id) AS count, t.title AS title from content c, topic t, content_x_topic x
- WHERE c.id = x.content_id AND t.id = x.topic_id GROUP BY t.title ORDER BY length(t.title)"
+ <FreeQuery key="topicCounts" query=" SELECT count(x.content_id) as count, t.title FROM topic as t LEFT OUTER JOIN content_x_topic
+ as x ON (t.id=x.topic_id) LEFT OUTER JOIN content as c ON (c.id=x.content_id)
+ WHERE t.archiv_url = 'Category' GROUP BY t.title ORDER BY length(t.title)"
type="set"/>
<Generate generator="/topiccount.template"