def ajax(self, *args, **kwargs):
self.get_id = self.enteride.get()
# get the product info with that id and fill it in the labels above
query = "SELECT name,sp FROM ss WHERE name=%s"
result = mycursor.execute(query, (self.get_id,))
for self.r in result:
self.get_name = self.r[0]
self.get_price = self.r[1]
self.productname.configure(text="Product's Name:" + str(self.get_id))
self.pprice.configure(text="Price:Rs. " + str(self.get_price))