title: Unable to get function in class to work
body: <p>One part of the coursework project that I am doing requires me to create a login page and incorporate a database, I have doe so successfully using python in its normal form but I now have had to put this into a GUI using tkinter and to get it work I have had to use a function on the page which calls for records in  the database to be found and compared with the user input. The issue that I am experiencing is that when I call on this function it does nothing, probably due to a simple mistake in my coding but I cant figure it out for some reason or another.</p>
  
  <pre><code>class LogInScreen(tk.Frame):
      def __init__(self, parent, controller):
  
          tk.Frame.__init__(self, parent)
          description = tk.Label(self, text="Please log in to gain access to the content of this computer science program.", font=LARGE_FONT)
          description.pack()
  
          label1 = tk.Label(self, text="Enter your username:")
          label1.pack()
  
          self.usernameEntry = tk.Entry(self)
          self.usernameEntry.pack()
  
          label2 = tk.Label(self, text="Enter your password:")
          label2.pack()
  
          self.passwordEntry = tk.Entry(self, show="*")
          self.passwordEntry.pack()
  
          notRecognised=tk.Label(self, text="")
  
          logInButton = tk.Button(self, text="Log In", command=lambda: self.logUserIn)
          logInButton.pack()
  
          self.controller = controller
  
          button1 = tk.Button(self, text="Back to Home",
                      command=lambda: controller.show_frame(SplashScreen))
          button1.pack()
  
          button2 = tk.Button(self, text="Sign Up",
                      command=lambda: controller.show_frame(SignUpScreen))
          button2.pack()
  
  
  
      def logUserIn():
          username = self.usernameEntry.get()
          password = self.passwordEntry.get()
  
          find_user = ("SELECT * FROM user WHERE username == ? AND password == ?")
          cursor.execute(find_user,[(username),(password)])
          results = cursor.fetchall()
  
          if results:
              controller.show_frame(HubScreen)
          else:
               loginResult = tk.Label(self, text="Account credentials not recognised, please try again")
               loginResult.pack()
  </code></pre>
  
  <p>I'm unsure as to how I should go about getting this function to work and really need the help people on here are capable of offering. I have spent far too long looking at the code and doing nothing about it to carry on, I've  tired to work around it, doing other parts of the program but it is hard to assess them without this feature working. Sorry to be an inconvenience to those who are more talented than I am but its a learning process and I am trying to improve as I go. </p>