Follow the code below that is causing the error quoted in the title:
select (select id from message where user_from = tempMsg.user OR user_to = tempMsg.user) as id from tempMsg
How can I solve it? Could someone help me fast?
Follow the code below that is causing the error quoted in the title:
select (select id from message where user_from = tempMsg.user OR user_to = tempMsg.user) as id from tempMsg
How can I solve it? Could someone help me fast?
Instead of this subquery try this:
select a.id
from message a
inner join tempMsg b
on a.user_from = b.user
and a.user_to = b.user