【发布时间】:2015-01-29 20:51:34
【问题描述】:
这是我的查询:
SELECT *
FROM messages
WHERE status = 1
AND (
poster IN (SELECT thing FROM follows WHERE follower = :uid AND type = 3)
OR
topic_id IN (SELECT thing FROM follows WHERE follower = :uid AND type = 1)
)
ORDER BY post_date DESC LIMIT 0, 20
我想知道行来自哪个子句。来自poster IN (...) 部分还是topic_id IN (...) 部分?我该怎么做?
【问题讨论】:
标签: mysql sql select where-clause