mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-30 18:39:28 +00:00
32 lines
544 B
PHP
32 lines
544 B
PHP
<?php
|
|
class Bookmark_model extends DB_Model
|
|
{
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->dbTable = 'dashboard.tbl_bookmark';
|
|
$this->pk = 'bookmark_id';
|
|
}
|
|
|
|
/**
|
|
* returns all bookmark tags of a user
|
|
*/
|
|
public function getAllBookmarkTags($uid)
|
|
{
|
|
$qry = "
|
|
SELECT array_agg(DISTINCT tag) AS data
|
|
FROM (
|
|
SELECT jsonb_array_elements_text(tag) AS tag
|
|
FROM dashboard.tbl_bookmark
|
|
WHERE uid = ?
|
|
) t;
|
|
";
|
|
|
|
return $this->execQuery($qry, array('uid' => $uid));
|
|
}
|
|
}
|