a=cur.execute("select ip,info,env from machine_info where substring_index(ip,'.',-1) +0 >=%s and substring_index(ip,'.',-1) + 0<=%s and ip like '%%%s%%'" % (startip,stopip,f4))
a=cur.execute("select ip,info,env from machine_info where substring_index(ip,'.',-1) +0 >=%s and substring_index(ip,'.',-1) + 0<=%s and ip like '%%%s%%'" % (startip,stopip,f4))