title: Find value in database between to values
body: <p>I wan't to make a function that returns a Country based on a IP.
  I have converted the IP to a decimal value, so mysql can make "Between". 
  Below is what i got so fare.</p>
  
  <pre><code>def get():
       con = pymysql.connect(host='localhost', port=3306, user='root',
       passwd='******', db='IP')
       ip_d = "16777221"
       with con:
  
           cur = con.cursor()
           return cur.execute("SELECT Land FROM IPaddresses where ip_d
           BETWEEN Start and End")
  get()
  </code></pre>
  
  <p>Start and End are the first ip and end ip in a country, are also represented as a deciamal value.</p>