import sqlite3


def db_item_exists(dbfile, sql):
    """Check whether `sql` returns any records in sqlite db `dbfile`."""

    conn = sqlite3.connect(dbfile)
    c = conn.cursor()
    c.execute(sql)
    if c.fetchone():
        ret = True
    else:
        ret = False
    conn.close()
    return ret