【发布时间】:2011-05-20 10:25:26
【问题描述】:
好的,我有第一张桌子,其中包括:
表 1: id | depID(每个 id 都有一个 depID)
然后,我有第二个表,其中有 表 2:userID | depID(其中一个用户 ID 与单独行中的多个 depID 相关联。另外,我有 表 3 strong> 与 userID | rankID(其中一个 userID 与一个 rankID 相关联)。
我需要从表 1 中获取所有 id 和 depID,然后检查表 2 的哪些用户 ID 共享相同的 depID (table1.depID = table2.depID),然后检查表中的哪些用户 ID 2 有 rankID = $rID
谢谢大家。
【问题讨论】: