lundi 7 mars 2016

How to search for strings

      def verify(username, password):
        Nusername = c.execute("""SELECT * FROM loginCredentials WHERE username LIKE %s"""(username))
        print(Nusername)

      verify("admin", "password")

How can I search for a single string in a database using an SQLite query. Here is what I have so far but I keep getting str error. loginCredentials is the table name.

Aucun commentaire:

Enregistrer un commentaire