一个礼物表: from(赠送者) to(收到者)
一个用户表:id nickname
from和to都关联用户表的id,怎么查询出结果:
赠送者昵称 收到者昵称
一个礼物表: from(赠送者) to(收到者)
一个用户表:id nickname
from和to都关联用户表的id,怎么查询出结果:
赠送者昵称 收到者昵称
select usertable1.nickname, usertable2.nickname from gifttable left join usertable as usertable1 on usertable1.id = gifttable.from left join usertable as usertable2 on usertable2.id = gifttable.to
4 回答968 阅读
1 回答643 阅读✓ 已解决
2 回答617 阅读
1 回答646 阅读
603 阅读
其中的中文换成对应英文。。。字段自己处理一下