join tables with relationship in mysql and php code example
Example: mysql join two tables
SELECT user_id, user_name
FROM users
UNION
SELECT organization_id, organization_name
FROM organizations
SELECT user_id, user_name
FROM users
UNION
SELECT organization_id, organization_name
FROM organizations