I'm trying to concatenate multiple id's brought in as a long string. Here is my query below. The problem I am getting is I only get the first id from my result. Now if I take the quotes out it will work perfectly but it is not brought in that way. It is brought in surrounded in quotes '64,66,63'
I want to get all three id's '64,66,63'
and I've done some digging on the CONCAT
function for bringing this together but I can't get it to work. Any help is appreciated. If I'm going about this all wrong, I'm all ears.
select
user.id,user.firstname,user.lastname,user.type,user.email,group_user.deleted,
group_user.user_id,group_user.title,group_user.group_id
from user right join group_user on user.id = group_user.user_id
where group_user.title != 'Special' and group_user.group_id in ('64,66,63')
and group_user.deleted = 0 and user_id != ''