mysql group by 分组 count 返回值的类型 求大神指教!!
2个回答
展开全部
<?php
mysql_connect("localhost","root","root");
mysql_select_db("db");
mysql_query("set names utf8");
$sql = "select count(*),dtime from db_users group by dtime";
$result = mysql_query($sql);
$m = mysql_fetch_assoc($result);
var_dump($m);
?>
打印结果
array (size=2)
'count(*)' => string '25' (length=2)
'dtime' => string '2015-06-20' (length=10)
竟然是string型,保持观望
mysql_connect("localhost","root","root");
mysql_select_db("db");
mysql_query("set names utf8");
$sql = "select count(*),dtime from db_users group by dtime";
$result = mysql_query($sql);
$m = mysql_fetch_assoc($result);
var_dump($m);
?>
打印结果
array (size=2)
'count(*)' => string '25' (length=2)
'dtime' => string '2015-06-20' (length=10)
竟然是string型,保持观望
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询