具体是这样的,一个表user中有4个字段id(自己的id),firstid(first表的id),secondid(second表的id),thirdid(third表的id)。现在有1要求:就是这个表中的数据firstid,secondid,thirdid只能有1个不等于0,其余的都是0。比如说第一条数据是
id firstid secondid thirdid
1  0        0          1
但是这3个表是关联的。third表中的字段(id,parentsid,name),其中parentsid是second的id。
                    second表中的字段(id,parentsid,name),其中parentsid是first的id。 
所以现在查询user的第一个表时要求能显示出3个表中的name