MySQL Database Operations


  1. The most restrictive among the following is ______________.
    mysql_query(), mysql_real_query()











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    The statement-issuing function other than ‘mysql_real_query()’ is ‘mysql_query()’. It is more restrictive in what it allows in the statement string although it is often easier to use.


  1. What is the general statement-issuing routine?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The general statement-issuing routine is mysql_real_query(). The statement is provided as a counted string (a string plus a length). The length of the statement string must be kept track of.



  1. Which of the following does not return a value?
    mysql_close(), mysql_init, mysql_real_connect











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    It is not necessary that every Application Programming Interface call would return a value. For example, the client routine named ‘mysql_close()’ returns void, that is, it does not return a value.


  1. Which of the following use ‘NULL’ to indicate failure?
    mysql_init(), mysql_real_connect()











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Both of the client library routines named ‘mysql_init()’ and ‘mysql_real_connect()’ return a pointer to the connection handler in order to indicate success and NULL to indicate failure.



  1. The header that should be included first is ______________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The file ‘my_global.h’ takes care of including several other header files that are likely to be generally useful, like ‘stdio.h’. It also includes Windows compatibility information.