php – mysql选择计数与另一个选择计数
发布时间:2020-12-13 21:45:32 所属栏目:PHP教程 来源:网络整理
导读:我怎样才能在 mysql中结合这两个查询? select count(*) as entry_count from tbl_entries where user_id = x 和 select username,avatar from tbl_users where user_id = x 我想要一个结合这2个查询的结果的结果.请帮帮我们! 谢谢! 解决方法 select usern
我怎样才能在
mysql中结合这两个查询?
select count(*) as entry_count from tbl_entries where user_id = x 和 select username,avatar from tbl_users where user_id = x 我想要一个结合这2个查询的结果的结果.请帮帮我们! 谢谢! 解决方法select username,avatar,(select count(*) from tbl_entries where user_id = x) as entry_count from tbl_users where user_id = x (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |