我无法用我当前的配置来计算数据库中的用户数。
<?php
require_once 'scripts/app_config.php';
mysqli_connect(DATABASE_HOST,DATABASE_USER,DATABASE_PASS,DATABASE_NAME);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = "SELECT COUNT(*) FROM users";
$result = mysql_query($query);
$num = mysql_num_rows($result);
echo "There are: ". $num . " users in the database";
mysqli_close($con);
?>