0
I am mounting a select in Mysql as follows:
select lista,
(select if (count(login.LogID) > 0, 'S', 'N') from login where login.LogID = 407 and login.LogID in (11,157,66,158,407)) as Seguindo
from Comentarios
If I run this select in my database it returns 'S'
in the field Seguindo
, but if I replace mine in
as follows:
select lista,
(select if (count(login.LogID) > 0, 'S', 'N') from login where login.LogID = 407 and login.LogID in (lista)) as Seguindo
from Comentarios
Where Lista
is a table field comentarios
with the content 11,157,66,158,407
, Mysql returns as N
in the field Seguindo
.
My field lista
is the type varchar
. Would anyone know the reason for this behavior? And how would it be possible to get around it?