您需要使用
as关键字为聚合设置别名,以便从中进行调用
mysql_fetch_assoc
$result=mysql_query("SELECt count(*) as total from Students");$data=mysql_fetch_assoc($result);echo $data['total'];
您需要使用
as关键字为聚合设置别名,以便从中进行调用
mysql_fetch_assoc
$result=mysql_query("SELECt count(*) as total from Students");$data=mysql_fetch_assoc($result);echo $data['total'];