MySQL join select on two different database tables
MySQL join select on two different database tables
Your query involves 2 id columns one from inner query and second from partner_company_clients
so using select id
it isnt clear enough which id column you want so use alias before the column name or use complete db and table name before columns
SELECT mac.id, pcc.phone
....
or
SELECT mac.id, b_database.partner_company_clients.phone
....