$count = $db->query("SELECT COUNT(id) FROM users");
する必要があります
$count = $db->query("SELECT COUNT(id) FROM users")->fetchColumn();
echo $count; //Returns number of rows
$count = $db->query("SELECT COUNT(id) FROM users");
する必要があります
$count = $db->query("SELECT COUNT(id) FROM users")->fetchColumn();
echo $count; //Returns number of rows