x-x.sql

    1. SELECT * FROM (
    2. SELECT *, CONVERT(SUBSTRING_INDEX(invite_num_range, '-', 1),SIGNED) AS lower,
    3. CONVERT(SUBSTRING_INDEX(invite_num_range, '-' ,- 1),SIGNED) AS upper
    4. FROM jmf_invite_reward_config) AS a
    5. WHERE 0 BETWEEN a.lower-1 AND a.upper ORDER BY a.lower+1