151k views
0 votes
It is a function that ends the connection to the database.

Select one:

a. mysql_close / mysqli_close

b. mysql_query / mysqli_query

c. mysql_connect / mysqli_connect

d. mysql_error / mysqli_error

User Earino
by
4.9k points

2 Answers

4 votes

Answer:

a. mysql_close / mysqli_close

Step-by-step explanation:

mysql_close/mysqli_close closes existing MySql connection.

Example usage:

<?php

$link = mysql_connect('localhost', 'userid', 'password');

// Close the connection reference $link

mysql_close($link);

?>

Mysqli represents an improved version of mysql driver.

<?php

$link = mysqli_connect('localhost', 'userid', 'password');

if ($link) {

// Close the connection reference $link

mysqli_close($link);

}

?>

User Salman Lone
by
4.4k points
1 vote

Answer:

mysql_close/ mysqli_close.

Step-by-step explanation:

mysql_close / mysqli_close functions are used to close the connection to the database.mysql_close is removed from the php version 7.0.0 and mysqli_close is used .

If the link in the mysql_close is not specified it so the last link opened by mysql_connect() is assumed.

It returns the value True or False.True on success false on failure.

User Sem Vanmeenen
by
5.2k points