$user = $_SESSION["usuario"]["id"];
$sel = BD::conn()->prepare("SELECT lk.*, ep.*
FROM gostados lk
INNER JOIN episodios ep ON
ep.id_anime = lk.id_anime AND
ep.ep_temporada = lk.ep_temporada AND
ep.episodio = lk.episodio
WHERE
lk.id_usuario = :user
ORDER BY data ASC
LIMIT 0,200");
$sel->bindValue(":user", $user);
$sel->execute();
$row = $sel->rowCount();
if($row >= 1){
echo "1";
}else{
echo "0";
}
I already checked the id of the user that is being used as SELECT
and is correct, what could be the error that causes bindValue
to always return 0?