我目前正在尝试从Jive 5.0数据库导出配置文件图像。我有postgre查询拉取图像。但是我很难确定哪个图像是该配置文件的当前所选图像。
select *
from jiveuser u
LEFT JOIN jiveusercontainer c ON u.userid = c.userid
LEFT JOIN jivecontent ct ON ct.containerid = c.usercontainerid
left join jiveattachment ja on ja.objectid = ct.contentid
WHERE ct.contenttype = 501 and
ja.objecttype = 501 and
u.userid in (4794) and
filename = 'profile_image_500.png'
order by ja.modificationdate desc
有谁知道这些信息存储在Jive数据库中的哪个位置?
答案 0 :(得分:1)
这是我认为会提取当前个人资料图片的查询:
select ja.attachmentid, c.displayname, ja.creationdate, ja.filename , (select propvalue from jivecontentprop jcpi where jcpi.contentid = ct.contentid and propname = 'index' )
from jiveuser u
LEFT JOIN jiveusercontainer c ON u.userid = c.userid
LEFT JOIN jivecontent ct ON ct.containerid = c.usercontainerid
left join jiveattachment ja on ja.objectid = ct.contentid
WHERE ct.contenttype = 501 and
ja.objecttype = 501 and
u.userid in (4794) and
filename = 'profile_image_500.png'
order by propvalue
limit 1