用户、事件和组都可以在照片中标记。在 photo_tag 的可用字段中,您无法区分哪个主题 ID 是用户、事件或组。我只想返回在照片中标记的朋友列表,忽略不是我朋友的事件、群组和用户。
有谁知道为什么这会返回 0 个结果?
SELECT subject, xcoord, ycoord, text
FROM photo_tag
WHERE object_id = [PHOTO_OBJECT_ID]
AND subject IN (SELECT uid2 FROM friend WHERE uid1 = me())
虽然...
SELECT subject, xcoord, ycoord, text
FROM photo_tag
WHERE object_id = [PHOTO_OBJECT_ID]
返回一个用户列表,其中包括我的朋友,由...验证
SELECT uid2 FROM friend where uid1 = me() and uid2 = [SUBJECT_USER_ID]