PHP MySQL Database
- Which of the following methods is used to execute the statement after the parameters have been bound?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
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.
- Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
fetch()
- Which one of the following methods is used to recuperating prepared statements resources?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Once you’ve finished using a prepared statement, the resources it requires can be recuperated with the close() method.
- If there is no error, then what will the error() method return?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
Empty String
- Which version of MySQL introduced the prepared statements?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
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.