Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Cyber Security
  3. Question
Cyber Security

Why do we use --+ to comment on the rest of the query?

Asked by Anil Jha Feb 24, 2022 552 views 1 answer
Share

About this question

Why should we sometimes use --+ instead of -- in SQL injection to comment the rest of the query?  I have encountered some websites where when I used -- + to comment on the rest of the query it didn't work, but when I tried --+ it worked.


In the MySQL official documentation there is no such thing as --+ and we only have -- and two other ways.


Why does this happen? I want to know exactly why this works sometimes and -- doesn't, and why there is no --+ for comments in the MySQL man page? 

Your answer

1 Answer

More Cyber Security discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Cyber Security Blogs

Guides, tips and career advice on Cyber Security from JanBask experts.