SELECT m.id, m.ipaddr, j.name, j.port, j.cfg_name, m.job_id, m.update_at FROM mxxxxx AS m LEFT JOIN jxxxxx AS j ON JSON_CONTAINS(m.job_id, JSON_array(j.id)) WHERE j.is_common=0 AND (m.ipaddr LIKE '%1%' OR j.name LIKE '%1%' ) ORDER BY m.update_at desc