title: How to select ip address in between the ip range from database using query?
body: <p>I have <code>ip_table</code> as below. Suppose my <code>IP address is 1.22.13.15</code>. But in my table this exact IP address is not available, This IP address is in the range between <code>0/24</code>. How can I get the <code>geoname_id</code> for this IP address? Can someone assist me? Or there is any other way?</p>
  
  <pre><code>+---------------+------------+
  | ip_adr        | geoname_id |
  +---------------+------------+
  | 1.22.13.0/24  |    1279233 |
  | 1.22.130.0/23 |    1273294 |
  | 1.22.132.0/23 |    1267995 |
  | 1.22.134.0/23 |    1253405 |
  | 1.22.136.0/21 |    1269750 |
  +---------------+------------+
  </code></pre>