复制代码 代码如下:
$sql="SELECT COUNT(*) AS count FROM TABLE WHERE";
$result=mysql_fetch_array(mysql_query($sql));
$count=$result['count'];
复制代码 代码如下:
$sql="SELECT * FROM TABLE WHERE";
$result=mysql_fetch_array(mysql_query($sql));
$count=count($result);//或者$count=mysql_num_rows($result);
新闻热点
疑难解答