Vidyalelo
MySQL · Q1154

MySQL

Programming · MySQL · question 1154

Q1154

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

A.
0
B.
1
Answer
C.
2
D.
3

Answer: Option B

Solution

Answer: Option B
Solution:
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.