i am using sqlite3 with python and want the data of my colomn "Pcode" and the situation is that "Pcode" is stored in a variable say "b"
b= "Pcode"
b = str(b)
c.execute('''SELECT ? FROM AddStock''',(b,))
results = c.fetchall()
print(results)
the expected results are as follows
[('***data from database***',), ('***data from database***',)]
but getting the result as :
[('Pcode',), ('Pcode',)]
and i dont know why iam getting this type of results?