odbc_close

void odbc_close(resource conn) 

Closes an ODBC connection.

Returns:

Void

Description:

Closes an open connection to an ODBC database. Any transactions must be committed before closing the connection, or the connection will stay open. The connection will close automatically if the script terminates and there are no uncommitted transactions.

Version:

Existing since version 3.0.6

Example:

Close a database connection
$db = odbc_open("Northwind","user","pass"); 
odbc_close($db); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.