Examveda

How many among the following does not return a value?
mysql_close(), mysql_init, mysql_real_connect

A. 0

B. 1

C. 2

D. 3

Answer: Option B

Solution (By Examveda Team)

This question is about functions in MySQL used for connecting to a database.
Let's break down each function:
mysql_close(): This function closes the connection to the MySQL database. It doesn't return any value, it simply performs an action.
mysql_init(): This function initializes a MySQL connection handle. It also doesn't return any value; it prepares the connection handle for use.
mysql_real_connect(): This function establishes a connection to the MySQL database. It returns a value that indicates the success or failure of the connection attempt.
So, out of the three functions, two (mysql_close() and mysql_init()) do not return any value.
Therefore, the correct answer is Option C: 2.

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous