企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
#### PHP怎么获得mysql分组后记录查询总数 * * * * * ~~~ if (mysql_connect('localhost','root','root')){ // 从数据库中读取数据 ,count出来加了别名ct用来获取数据时标示字段名用 $query = "SELECT count(aid) as ct FROM table group by aid"; if ($result=@mysql_query($query)){ while($rows=@mysql_fetch_array($result)){ $rows[ct];//这里循环处理每一行ct字段的值 } mysql_free_result($result); } } ~~~