我有论坛的话题表。我不希望选择隐藏论坛的主题,但用户自己的主题除外。我这样的查询和$ hiddenforums变量中的隐藏论坛ID,所以我也想选择用户自己的线程;
SELECT tid,uid,username
FROM ".TABLE_PREFIX."threads
WHERE fid NOT IN ($hiddenforums) /* HERE WHAT I WANT */ EXCEPT WHERE uid = $userownid /* */
ORDER BY dateline
DESC LIMIT 10
答案 0 :(得分:0)
这是您想要的吗?
WHERE (fid NOT IN ($hiddenforums) OR uid = $userownid)