PHP Database Connection
PHP Database Connection - Important Points
16. | Which of the following functions is used to retrieve the error message associated with the most recent database operation in PHP? |
---|
A. mysql_error()
B. mysqli_error()
C. pdo_error()
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
17. | Which of the following functions is used to check if a database connection is still active in PHP? |
---|
A. mysql_ping()
B. mysqli_ping()
C. pdo_ping()
D. None of the above
View Answer Discuss Work SpaceAnswer: option b
Explanation:
18. | Which of the following functions is used to set the character set for the database connection in PHP? |
---|
A. pdo_set_charset()
B. mysql_set_charset()
C. mysqli_set_charset()
D. None of the above
View Answer Discuss Work SpaceAnswer: option c
Explanation:
19. | Which of the following functions is used to retrieve the current character set for the database connection in PHP? |
---|
A. mysqli_character_set_name()
B. mysql_character_set_name()
C. pdo_character_set_name()
D. None of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
20. | Which of the following functions is used to free up memory associated with a result set in PHP? |
---|
A. pdo_free_result()
B. mysql_free_result()
C. mysqli_free_result()
D. None of the above
View Answer Discuss Work SpaceAnswer: option c
Explanation: