What returns a string containing an error message?
A. mysql_error()
B. mysql_errno()
C. mysql_sqlstate()
D. mysql_close()
Answer: Option A
Solution (By Examveda Team)
This question asks about a function in MySQL that provides information about errors that occur during database operations.Let's understand the options:
Option A: mysql_error()
This function returns a string containing the actual error message.
Option B: mysql_errno()
This function returns an integer representing the error number.
Option C: mysql_sqlstate()
This function returns a five-character SQLSTATE error code.
Option D: mysql_close()
This function closes a database connection and doesn't return an error message.
Therefore, the correct answer is Option A: mysql_error() because it specifically returns the error message as a string.
Related Questions on MySQL Miscellaneous
How is communication established with MySQL?
A. SQL
B. Network calls
C. A programming language like C++
D. APIs
Which type of database management system is MySQL?
A. Object-oriented
B. Hierarchical
C. Relational
D. Network
Join The Discussion