在PHP里面用 Select count获得的记录数,怎么赋值给一个变量
1个回答
2016-02-28
展开全部
select count(*) as total from tab
用的时候用
rs("total")
就OK
$qid = mysql_query("select count(*) as total from tab ");
$res = mysql_fetch_array($qid);
$count = $res['total'];
用的时候用
rs("total")
就OK
$qid = mysql_query("select count(*) as total from tab ");
$res = mysql_fetch_array($qid);
$count = $res['total'];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询