@@ 51-58 (lines=8) @@ | ||
48 | return $newRes; |
|
49 | } |
|
50 | ||
51 | public function returnAllTagsFromPost($db, $id) |
|
52 | { |
|
53 | $post = new Post(); |
|
54 | $post->setDb($db); |
|
55 | $sql = "SELECT Category FROM VCategory WHERE postid = ?"; |
|
56 | $res = $post->findAllSql($sql, $id); |
|
57 | return $res; |
|
58 | } |
|
59 | ||
60 | ||
61 | public function returnPopularTags($db) |
|
@@ 61-68 (lines=8) @@ | ||
58 | } |
|
59 | ||
60 | ||
61 | public function returnPopularTags($db) |
|
62 | { |
|
63 | $post = new Post(); |
|
64 | $post->setDb($db); |
|
65 | $sql = "SELECT catid, count(catid) as count FROM Post2Cat GROUP BY catid order by count desc LIMIT 5"; |
|
66 | $res = $post->findAllSql($sql); |
|
67 | return $res; |
|
68 | } |
|
69 | } |
|
70 |