def address_in_db(cursor, address):
    """Returns true if address is in database, false otherwise."""
    cursor.execute('SELECT address FROM farmers WHERE address=?',
                   (str(address),))
    data = cursor.fetchone()
    if data is None:
        return False
    return True