我正在尝试显示计数,但仅在列deleted
等于 0的情况下
这是我尝试过的
$result=mysql_query("SELECT * FROM users where deleted=0")or die('Error ' );
$counter = mysql_query("SELECT COUNT(*) as personID FROM users");
$row = mysql_fetch_array($result);
$personID = $row['personID'];
$personFname = $row['personFname'];
$personSname = $row['personSname'] ;
$llmail = $row['llmail'];
$mainadmin = $row['mainadmin'];
$delete = $row['delete'];
$num = mysql_fetch_array($counter);
$count1 = $num["personID"];
这显示了 4 的计数,但是 4、2 被删除了,所以如果这有意义,它应该只显示 2?