Here is the result of the added line. It looks as thought it is not seeing the $WADAmaintbl specialtiesID. Is that correct?
I tried several things but cant see the issue. I added SEPARATOR ',' within the (specialty) area just to try it.. took it back out.
SELECT GROUP_CONCAT(specialty) AS specialties FROM specialtytbl WHERE specialtyID IN ()