PHP MySQl 多个表关联查询问题

2025-03-24 20:12:07
推荐回答(4个)
回答1:

select c.name from 收藏表 a,用户表 c where a.user_id = c.user_id

回答2:

"select * from 收藏表 as A,用户表 as B where A.user_id=B.user_id and A.user_id='张三'";

回答3:

select c.name from t_fav_info a, t_content_info b, t_user_info c where a.user_id='1000' and a.show_id=b.show_id and b.user_id=c.user_id;

t_fav_info:收藏信息表
t_content_info:文章表
t_user_info:用户表

回答4:

select c.name from c left jion b on c.user_id=b.user_id left jion a on b.show_id = a.show_id