Home > PHP & Programming > Quizzes > PHP Programming Basics Practice Test: Working With Databases in PHP
PHP Programming Basics Practice Test: Working With Databases in PHP
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 71% Most missed: “Which one of the following statements instantiates the mysqli class?”
PHP can be used to connect to databases using the XAMPP web server, which is lightweight and can be used for website development. Here are some steps to retrieve data from a database in PHP: Establish a connection with the server Select the database Execute the MySQL select query Display the fetched data Close the connection with the server Here are some examples of code to retrieve data from a database: Fetch data from a table named "employee" in a database named "company": `$connection = mysql_connect(``localhost'', ``root'', ``'');  $db = mysql_select_db(``company'',... Show more
PHP Programming Basics Practice Test: Working With Databases in PHP
Time left 00:00
19 Questions

1. Which one of the following statements should be used to include a file?
2. Which version of MySQL introduced the prepared statements?
3. Which one of the following methods recuperates any memory consumed by a result set?
4. Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?
5. If there is no error, then what will the error() method return?
6. Which one of the following statements should be used to include a file?
7. Which one of the following databases has PHP supported almost since the beginning?
8. .Which one of the following statements can be used to select the database?"
9. Which one of the following methods can be used to diagnose and display information about a MySQL connection error?
10. Which one of the following lines need to be uncommented or added in the php.ini file so as to enable mysqli extension?
11. Which one of the following methods is used to recuperating prepared statements resources?
12. Which one of the following methods can be used to diagnose and display information about a MySQL connection error?
13. Which of the following methods is used to execute the statement after the parameters have been bound?
14. Which one of the following statements instantiates the mysqli class?
15. Which version of MySQL introduced the prepared statements?
16. The updated MySQL extension released with PHP 5 is typically referred to as _______________
17. Which one of the following methods is used to recuperating prepared statements resources?
18. Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
19. Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?