How we can Prevent SQL Injection in Phoenix framework?

How we can Prevent SQL Injection in Phoenix framework . Pls hep with the sample source code.

Thanks,
Abhishek

Just use ecto to build your queries and never build them from strings. That should do it.

4 Likes

Follow the guidelines here:
https://hexdocs.pm/ecto/Ecto.Query.html#module-interpolation-and-casting