ExamVeda
Login
Home
11
Which one of the following statements should be used to include a file?
Discuss
Answer & Solution
Answer: Option B
Solution:
An example of this-


12
Which one of the following methods is responsible for sending the query to the database?
Discuss
Answer & Solution
Answer: Option A
Solution:
Its prototype looks like- class mysqli { mixed query(string query [, int resultmode]) }
13
Which one of the following methods recuperates any memory consumed by a result set?
Discuss
Answer & Solution
Answer: Option D
Solution:
Once this method is executed, the result set is no longer available.
14
Which of the methods are used to manage result sets using both associative and indexed arrays?
Discuss
Answer & Solution
Answer: Option C
Solution:
Their prototype is as follows- calss mysqli_result { mixed fetch_array ([int resulttype]) } calss mysqli_result { mixed fetch_row() }
15
Which one of the following method is used to retrieve the number of rows affected by an INSERT, UPDATE, or DELETE query?
Discuss
Answer & Solution
Answer: Option B
Solution:
The method num_rows() is only useful for determining the number of rows retrieved by a SELECT query. But to retrieve the number of rows affected by INSERT, UPDATE, or DELETE query, use affected_rows().
16
Which version of MySQL introduced the prepared statements?
Discuss
Answer & Solution
Answer: Option B
Solution:
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.
17
Which of the following methods is used to execute the statement after the parameters have been bound?
Discuss
Answer & Solution
Answer: Option A
Solution:
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.
18
Which one of the following methods is used to recuperating prepared statements resources?
Discuss
Answer & Solution
Answer: Option D
Solution:
Once you’ve finished using a prepared statement, the resources it requires can be recuperated with the close() method.
19
Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?
Discuss
Answer & Solution
Answer: Option C
Solution:
Its prototype follows: class mysqli { boolean fetch() }
20
Which method rolls back the present transaction?
Discuss
Answer & Solution
Answer: Option D
Solution:
Its prototype follows: class mysqli { boolean rollback() }