I am trying to prevent sql injection with like clause

Viewed 42

This is the real query

But I need to use the SQL injection here instead of passing the user_name as variable, I need to pass it as a parameter. How can it be done?

query="""Select * from user where username like '{user_name}'""";     
df=pd.read_sql(query,con)
0 Answers
Related