aww, comeone, someone else please
ok, here you are, just snipets, not tested, nor implemented:
PHP Code:
$smilie_counts = array();
$posts = $DB_site->query("
SELECT smilietext, pagetext
FROM post, smilie
WHERE pagetext like concat("%",smilie.smilietext,"%")
");
while ($post = $DB_site->fetch_array($posts))
{
$smilie_counts["$post[smilietext]"] += substr_count($post['pagetext'], $post['smilietext']);
}
then $smilie_counts should contain the correct ammount of smilieusage for each smilie.
(at least if i didn't mess something up)