select u.nickname,u.sex
from users as u inner join bloodtype as b inner join star as s
on u.bloodtype=b.id and u.starid=s.id
where s.star='白羊座' and b.bloodtype='O型'
提示 第四行where附近语法错误!
哪里错了啊?????我晕。。
select u.nickname,u.sex
from users as u inner join bloodtype as b inner join star as s
on u.bloodtype=b.id and u.starid=s.id
where s.star='白羊座' and b.bloodtype='O型'
提示 第四行where附近语法错误!
哪里错了啊?????我晕。。
select u.nickname,u.sex
from users as u inner join bloodtype as b
on u.bloodtype=b.id
inner join star as s
on u.starid=s.id
where s.star='白羊座' and b.bloodtype='O型'
改成这样试试
select u.nickname,u.sex
from users as u ,bloodtype as b ,star as s where u.bloodtype=b.id and u.starid=s.id and s.star='白羊座' and b.bloodtype='O型'