Esempio n. 1
0
 function getTags($id = null)
 {
     require_once ROOT_DIR . '/sys/LocalEnrichment/UserTag.php';
     $tagList = array();
     $sql = "SELECT id, groupedRecordPermanentId, tag, COUNT(groupedRecordPermanentId) AS cnt " . "FROM user_tags WHERE " . "userId = '{$this->id}' ";
     $sql .= "GROUP BY tag ORDER BY tag ASC";
     $tag = new UserTag();
     $tag->query($sql);
     if ($tag->N) {
         while ($tag->fetch()) {
             $tagList[] = clone $tag;
         }
     }
     return $tagList;
 }