MCQOPTIONS
Saved Bookmarks
This section includes 9 Mcqs, each offering curated multiple-choice questions to sharpen your Php knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
If there is no error, then what will the error() method return? |
| A. | TRUE |
| B. | FALSE |
| C. | Empty String |
| D. | 0 |
| Answer» D. 0 | |
| 2. |
Which method returns the error code generated from the execution of the last MySQL function? |
| A. | errno() |
| B. | errnumber() |
| C. | errorno() |
| D. | errornumber() |
| Answer» B. errnumber() | |
| 3. |
Which one of the following methods can be used to diagnose and display information about a MySQL connection error? |
| A. | connect_errno() |
| B. | connect_error() |
| C. | mysqli_connect_errno() |
| D. | mysqli_connect_error() |
| Answer» D. mysqli_connect_error() | |
| 4. |
Which one of the following statements instantiates the mysqli class?a) mysqli = new mysqli()b) $mysqli = new mysqli()c) $mysqli->new.mysqli()d) mysqli->new.mysqli() 7.Which one of the following statements can be used to select the database? |
| A. | mysqli = new mysqli()b) $mysqli = new mysqli()c) $mysqli->new.mysqli()d) mysqli->new.mysqli() 7.Which one of the following statements can be used to select the database?a) $mysqli=select_db('databasename'); |
| B. | $mysqli = new mysqli()c) $mysqli->new.mysqli()d) mysqli->new.mysqli() 7.Which one of the following statements can be used to select the database?a) $mysqli=select_db('databasename');b) mysqli=select_db('databasename'); |
| C. | $mysqli->new.mysqli()d) mysqli->new.mysqli() 7.Which one of the following statements can be used to select the database?a) $mysqli=select_db('databasename');b) mysqli=select_db('databasename');c) mysqli->select_db('databasename'); |
| D. | mysqli->new.mysqli() 7.Which one of the following statements can be used to select the database?a) $mysqli=select_db('databasename');b) mysqli=select_db('databasename');c) mysqli->select_db('databasename');d) $mysqli->select_db('databasename');View Answer |
| Answer» C. $mysqli->new.mysqli()d) mysqli->new.mysqli() 7.Which one of the following statements can be used to select the database?a) $mysqli=select_db('databasename');b) mysqli=select_db('databasename');c) mysqli->select_db('databasename'); | |
| 5. |
Which one of the following statements is used to create a table? |
| A. | CREATE TABLE table_name (column_name column_type); |
| B. | CREATE table_name (column_type column_name); |
| C. | CREATE table_name (column_name column_type); |
| D. | CREATE TABLE table_name (column_type column_nam |
| E. | ;b) CREATE table_name (column_type column_name);c) CREATE table_name (column_name column_type);d) CREATE TABLE table_name (column_type column_name); |
| Answer» B. CREATE table_name (column_type column_name); | |
| 6. |
In which version of PHP was MySQL Native Driver(also known as mysqlnd) introduced? |
| A. | PHP 5.0 |
| B. | PHP 5.1 |
| C. | PHP 5.2 |
| D. | introduced?a) PHP 5.0b) PHP 5.1c) PHP 5.2d) PHP 5.3 |
| Answer» E. | |
| 7. |
Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension? |
| A. | extension=php_mysqli.dll |
| B. | extension=mysql.dll |
| C. | extension=php_mysqli.dl |
| D. | extension=mysqli.dl |
| Answer» B. extension=mysql.dll | |
| 8. |
The updated MySQL extension released with PHP 5 is typically referred to as _______________ |
| A. | MySQL |
| B. | mysql |
| C. | mysqli |
| D. | mysqly |
| Answer» D. mysqly | |
| 9. |
Which one of the following databases has PHP supported almost since the beginning? |
| A. | Oracle Database |
| B. | SQL |
| C. | SQL+ |
| D. | MySQL |
| Answer» E. | |