MCQs
$mysqli->select_db('databasename');
If you choose to interact with MySQL server using the object-oriented interface, you need to first instantiate the mysqli class via its constructor.
The mysqli extension includes a few features that can be used to capture error messages or alternatively you can use exceptions.
Error numbers are often used in lieu of natural-language message to ease software internationalization efforts and allow for customization of error messages.
Empty String
Once the statement has been prepared, it needs to be executed. Exactly when it's executed depends upon whether you want to work with bound parameters or bound results. In the case of bound parameters, you'd execute the statement after the parameters have been bound with the bind_param() method.
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.
Its prototype follows:class mysqli{boolean fetch()}
Once you've finished using a prepared statement, the resources it requires can be recuperated with the close() method.
Its prototype follows:class mysqli{boolean rollback()}