MySQL Database Operations
- The most restrictive among the following is ______________.
mysql_query(), mysql_real_query()
-
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.
- What is the general statement-issuing routine?
-
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.
- Which of the following does not return a value?
mysql_close(), mysql_init, mysql_real_connect
-
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.
- Which of the following use ‘NULL’ to indicate failure?
mysql_init(), mysql_real_connect()
-
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.
- The header that should be included first is ______________.
-
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.