Good evening,
This is a simple function reading the value of an entry widget and searching in the database for it. It won´t run. Could someone kindly point me to my rookie mistake?
This is the Function:
def find_search_term(self, search_term):
search_term = self.search_entry.get()
conn=sqlite3.connect("KTRmini.db")
c = conn.cursor()
c.execute("SELECT * FROM KTRmini_table WHERE discription LIKE "%search_term%",")
data=c.fetchone()[0]
print(discription)
conn.close()
This is the Error:
c.execute("SELECT * FROM KTRmini_table WHERE discription LIKE "%search_term%",") TypeError: not all arguments converted during string formatting