@@ -170,11 +170,12 @@ sub db_get_document_object { | |||
$q = sqlquery($dbh, " | |||
SELECT | |||
SUM(pw.count) AS count | |||
l.short AS lang | |||
l.short AS short | |||
FROM pages_words pw | |||
JOIN words w ON pw.wordID = w.id | |||
JOIN lang l ON w.langId = l.id | |||
WHERE pw.pageId = ?", $page->{id}); | |||
WHERE pw.pageId = ? | |||
GROUP BY l.id", $page->{id}); | |||
while(my $h = $q->fetchrow_hashref()) { | |||
$lang{$h->{lang}}=$h->{count}; | |||
} |