1.

Which version of MySQL introduced the prepared statements?(a) MySQL 4.0(b) MySQL 4.1(c) MySQL 4.2(d) MySQL 4.3This question was addressed to me during an interview.I would like to ask this question from Working with Databases-2 in section Objects and Databases in PHP of PHP

Answer»

The correct option is (b) MYSQL 4.1

To explain I would say: When the query() method is LOOPED repeatedly it comes at a cost of both overhead, because of the NEED to repeatedly parsing of the almost identical query for validity, and CODING convenience, because of the need to repeatedly reconfigure the query using the new values for each iteration. To help resolve the issues incurred by repeatedly executed queries, MySQL INTRODUCED prepared statements.



Discussion

No Comment Found

Related InterviewSolutions