I'm running into a problem, I have the following line in my query
CONCAT('',
(SELECT GROUP_CONCAT(DISTINCT trips_loads_rel.load_id,'') AS x
FROM `trips_loads_rel` WHERE trips_loads_rel.trip_id = trips.Id)
) AS loads
It shows something like 8,10,27 (ie, numeric IDs), some Ids from trips_loads_rel table. It works ok. However, how can I use that output to pull matching records from other table? I mean, the line shows me all ids ok, but I need to query other table with these to pull related records. Actually I don't need these IDs, I need their matching records...