Please try this query:-
SELECT *
FROM properties
WHERE (raw_min between 2200000 AND 2700000)
OR (raw_max between between 2200000 AND 2700000)
OR (raw_min <= 2200000 && raw_max >= 2700000)
Please check I have updated the query.
you see any wrong with the below query, its returning null... SELECT * FROM properties WHERE ((raw_min between '2222222.22222' and '2716049.38272') or (raw_max between '2222222.22222' and '2716049.38272') or (raw_max <= '2222222.22222' and raw_max >= '2716049.38272')) AND LOCATION LIKE '%madras%'
Only execute the mention query. SELECT * FROM properties WHERE ((raw_min between '2222222.22222' and '2716049.38272') or (raw_max between '2222222.22222' and '2716049.38272') or (raw_max <= '2222222.22222' and raw_max >= '2716049.38272'))
SELECT * FROM properties WHERE ((raw_min between '2222222.22222' and '2716049.38272') or (raw_max between '2222222.22222' and '2716049.38272') or (raw_max <= '2222222.22222' and raw_max >= '2716049.38272')) AND LOCATION LIKE '%madras%'
SELECT * FROM properties WHERE ( ( raw_min BETWEEN '2222222.22222' AND '9716049.38272' ) OR ( raw_max BETWEEN '2222222.22222' AND '9716049.38272' ) OR ( raw_max <= '2222222.22222' AND raw_max >= '2716049.38272' ) ) AND LOCATION LIKE '%madras%' LIMIT 0 , 30
19L to 75L is not in SELECT * FROM properties WHERE ((raw_max <= '2222222.22222') and (raw_max >= '2716049.38272')) AND LOCATION LIKE '%madras%'