mysql 一条sql,怎么查一个表里,不同条件对应的数据条数? 50
就是怎么把以下四个sql合并成一个$sql1="selectcount(*)asafromapp_userwheredev='android'andviews_time<...
就是怎么把以下四个sql合并成一个
$sql1 = "select count(*) as a from app_user where dev='android' and views_time<".$time." and views_time>".$time2;
$sql2 = "select count(*) as b from app_user where dev='iphone' and views_time<".$time." and views_time>".$time2;
$sql3 = "select count(*) as c from app_user";
$sql4 = "select count(*) as d from app_user where views_time<".$time." and views_time>".$time2;
请高手解答 谢谢 展开
$sql1 = "select count(*) as a from app_user where dev='android' and views_time<".$time." and views_time>".$time2;
$sql2 = "select count(*) as b from app_user where dev='iphone' and views_time<".$time." and views_time>".$time2;
$sql3 = "select count(*) as c from app_user";
$sql4 = "select count(*) as d from app_user where views_time<".$time." and views_time>".$time2;
请高手解答 谢谢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询