Categories
Development

How do I define the search function?

Hi need help with defining search, update function for my tkinter python app, unable to fin project, any help with the code is really appreciated.

def search():
    enter code hereconn = sqlite3.connect("books.db")
    cur = conn.cursor()
    cur.execute("SELECT * FROM book WHERE Agent=? OR CONTACT=? OR AQUA=? OR Email compostion=? OR Adherence to policy=? OR Call control rating=?"(
            Agent, Contact, AQUA, Email_composition, Adherance_to_policy, call_control_rating))
    rows = cur.fetchall()
    conn.close()
    return rows


search_btn=Button(window,text="Search Entry", width=12, command = search)
b1.grid(row=4,column=3)

window.mainloop()

Leave a Reply

Your email address will not be published. Required fields are marked *