我想检索用户照片上的所有评论。它不应该是特定的专辑照片。我尝试过类似的东西,但它不起作用。
SELECT fromid, user_likes, comments FROM comment
WHERE object_id IN (
SELECT object_id FROM photo
WHERE aid IN (
SELECT aid FROM album
WHERE owner=me()))
答案 0 :(得分:2)
您可以使用以下查询:
SELECT fromid, user_likes, **text** FROM comment
WHERE object_id IN
(
SELECT object_id FROM photo
WHERE aid IN (
SELECT aid FROM album WHERE owner=me()
)
)