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.

Certifications & exams

Which exam comes next?

You can already practise for 19 exams, and 21 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications