Zend
200-550 · Question #93
What is the preferred method for preventing SQL injection?
The correct answer is A. Always using prepared statements for all SQL queries. See the full explanation below for the reasoning.
Question
What is the preferred method for preventing SQL injection?
Options
- AAlways using prepared statements for all SQL queries.
- BAlways using the available database-specific escaping functionality on all variables prior to
- CUsing addslashes() to escape variables to be used in a query.
- DUsing htmlspecialchars() and the available database-specific escaping functionality to escape
How the community answered
(61 responses)- A84% (51)
- B2% (1)
- C10% (6)
- D5% (3)
Community Discussion
No community discussion yet for this question.