我想显示在PHP MySQL中状态为1(参见代码)的用户数。<?php// something like this$result = mysqli_query($mysqli, "SELECT COUNT(*) FROM users WHERE status = '1'");echo "$result";?>
1 回答
三国纷争
TA贡献1804条经验 获得超7个赞
尝试这个:
$query = "SELECT COUNT(*) as countvar FROM users where status = '1'";
$result = mysqli_query($con,$query);
$row = mysqli_fetch_array($result);
$count= $row['countvar '];
- 1 回答
- 0 关注
- 173 浏览
添加回答
举报
0/150
提交
取消