更新(Chad Johnsonに感謝): SELECT * FROM links WHERE 'subdomain.some-domain.com' LIKE CONCAT('%', domain_name, '%')