WHERE position = 'speaker'");
while($fetch = $query->fetch_array())
{
$id = $fetch['candidate_id'];
$query1 = $conn->query("SELECT COUNT(*) as total FROM votes WHERE candidate_id = '$id'");
$fetch1 = $query1->fetch_assoc();
?>
thats the code am using
so var_dump() the results of the queries and look what went wrong
You gotta check them all.. check the id to see if is the right value, check changing the count for a normal request to see if that request return values, etc.
Обсуждают сегодня