I write a method like below:
def add(self,table_name, tc_no, file_no):
self._cursor.execute("select HastaId from {}".format(table_name)," where TC=%s and FileNo=%s",(tc_no,file_no))
row = self._cursor.fetchone()
return row
and I got an error
TypeError: execute() takes at most 2 positional arguments (3 given)
I know the mistake in the format()
. How can i use that?