Saturday, September 7, 2019

Re: how to pass user input into raw sql query ?

Do not use string interpolation as proposed by Bhoopesh!!!

Take a look at:

On Friday, September 6, 2019 at 6:59:04 AM UTC-4, leb dev wrote:
i have a django project that is connected to sql server  database i am trying to write a select query   #convert the Django ORM into SQL query
    print("sql query  = ",FilterQuery.query)
 
select * from table name where filed name = user input 


can anyone help me with this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/14d1748a-9b51-47b6-83ad-7a4235c0ec9b%40googlegroups.com.

No comments:

Post a Comment