SQL injection · Question 7 of 12
How do you handle a page ID from the URL before it goes into a query?
1 answer is correct. Easy
Show answer
Answer
- D Bind it as an integer, for example with Connection::PARAM_INT
Explanation
The type PARAM_INT ensures that only an integer reaches the query. That IDs are "only numbers" is not guaranteed by the URL.