PHP MySQL Database


  1. Which of the following methods is used to execute the statement after the parameters have been bound?











  1. 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.


  1. Which method retrieves each row from the prepared statement result and assigns the fields to the bound results?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    fetch()



  1. Which one of the following methods is used to recuperating prepared statements resources?











  1. 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.


  1. If there is no error, then what will the error() method return?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Empty String



  1. Which version of MySQL introduced the prepared statements?











  1. 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.