I am often escaping inputs one by one and I am wondering about the difference between two methods. Which one is a more common practice? I tried escaping the “escape requiring” fields first, then I end up writing long escaping code for each value. What are the disadvantages of escaping a whole sql sentence at once?
Share
It doesn’t work because inside the query you are using things like ‘ single quotes to indicate values and you don’t want those escaped, but you do want to escape the values that might contain single quotes.