The error is as follows:
Call to undefined method PDOStatement :: fecth () in /home/ubuntu/workspace/redsocial/classes/gestores/ManagerSeguidor.php on line 73 Call Stack: 0.0004 236840 1. {main} () / home / ubuntu / workspace / redsocial / index.php: 0 0.0040 322128 2.
And my function is this:
function isFollower($id, $idPerfil){
$sql = 'SELECT count(*) FROM follow WHERE idPerfil = :idPerfil AND idFollow = :idFollow;';
$params = array(
'idPerfil' => $idPerfil,
'idFollow' => $id
);
$res = $this->db->execute($sql, $params);
$statement = $this->db->getStatement();
if($res && $row = $statement->fecth()){ // EN ESTA LINEA
return $row[0];
}
return 0;
}
The error is given to me in the if and I do not understand why, I have done this a thousand times, but now I can not see my error. Thanks in advance.