def query_definitions(database, dict_name, term):
    """Search the database for a dictionary definition."""
    definitions = []
    curs = database.cursor()
    sql = '''
        SELECT DF_ALT, DF_DEFN
        FROM DEFINITIONS
        WHERE DF_DICT=? AND DF_FORM1=? OR DF_DICT=? AND DF_FORM2=?
        '''
    curs.execute(sql, (dict_name, term, dict_name, term,))
    for alt_form, definition in curs:
        definitions.append([term, alt_form, definition])
    curs.close()
    return definitions