Databases Handling - Study Mode
[#1] Which one of the following databases has PHP supported almost since the beginning?
Correct Answer
(D) MySQL
[#2] The updated MySQL extension released with PHP 5 is typically referred to as.
Correct Answer
(C) mysqli
Explanation
Solution: The updated MySQL extension with PHP 5 is known as MySQL and typically referred to as mysqli.
[#3] Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?
Correct Answer
(A) extension=php_mysqli.dll
Explanation
Solution: Also make sure that extension_dir directive points to the appropriate directory.
[#4] In which version of PHP was MySQL Native Driver(also known as mysqlnd) introduced?
Correct Answer
(D) PHP 5.3
Explanation
Solution: PHP required that MySQL client library be installed on the server from which PHP was communicating with MySQL, whether the MySQL server also happened to reside locally or elsewhere. PHP 5.3 removes this problem by introducing MySQL Native Driver.
[#5] Which one of the following statements instantiates the mysqli class?
Correct Answer
(B) $mysqli = new mysqli()
Explanation
Solution: If you choose to interact with MySQL server using the object-oriented interface, you need to first instantiate the mysqli class via its constructor.