I'm preparing for Zend PHP 5.5 Certification and I found a question in study guide which seems to have a wrong answer. I just don't understand - is there a mistake in their question or answer or does escaping output prevent SQL Injection in any manner?
I searched on the net but I can't find any information to prove this.
If escaping output really protects from SQL Injection, can anybody explain how exactly? It would be great if you could bring an example.
Thank you very much.
Edit:
My question is not about how to prevent SQL Injection, but is if output escaping prevents SQL Injection in any way, so please don't mark my question as duplicate. Duplicate Questions don't give me any answer to this one.