Basically I am trying to return the total number of columns that correspond to a given criteria:
$exec = $link->query("SELECT COUNT(*) FROM `requests` WHERE language='PHP'"); $result = $exec->fetch(PDO::FETCH_ASSOC); echo $result[0]; However, the above does not return anything but the SQL query is correct since it returns a value when executed in phpMyAdmin.