def db_bibkey_id(c, bibkey):
    """ Return the id of tbe bibkey. Reture None if not found """
    c.execute('SELECT id FROM note WHERE bibkey = (?)', (bibkey,))
    res = c.fetchall()
    if res:
        return res[0][0]
    else:
        return None