Hi Guys,
I am trying to take the values of a text field in my GUI.py file, and feed the values in to a search option in Retrieve.py. So when the user types in a username and presses a button, the username they have searched for is then transferred to the retrieve.py file to run searches against a database. I am really not too sure how to do this. I am using Tkinter.
This is my retrieve code:
I am trying to take the values of a text field in my GUI.py file, and feed the values in to a search option in Retrieve.py. So when the user types in a username and presses a button, the username they have searched for is then transferred to the retrieve.py file to run searches against a database. I am really not too sure how to do this. I am using Tkinter.
This is my retrieve code:
def username(): con.sqlite3.connect('database') c = conn.cursor name = raw_input ("Enter Username") c.execute("SELECT users FROM Results WHERE users LIKE '%"+name+"%';") data = c.fetchall() print (data) c.close conn.close