$query = $db->prepare("SELECT COUNT(id_u) FROM account");
$query->execute();
$result = $query->fetch(PDO::FETCH_ASSOC);
$count = $result['count(id_u)'];
echo $count;
Not sure what I'm doing wrong here. I'm trying to get it to count the amount of registered users we have by counting the amount of id_u
's (user id).
Like I said in the comments, It might be similar to other posts but those don't explain how to fix my situation since they are not quite the same.