I have a table called deals which stores client_id1, client_id2, client_id3.
These ids correspond to clients table which have clientName and client_id fields.
How can I create a string array of names whose ids are there in any of the three columns of table deals.
Explanation:
Get client from one table:
The union will get them from the other tables, too
Now to get a Comma-Seperated-String, either do this clientside (php) or let the MySQL server do it, using a GROUP_CONCAT: