DbClose
dbClose
Closes a database connection owned by the current resource.
Syntax
bool dbClose(DatabaseConnection connection)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
connection |
DatabaseConnection |
yes | The connection returned by dbConnect.
|
Returns
Returns true when the connection is closed; otherwise returns false.
Examples
Close a resource database connection:
if db and dbIsConnected(db) then
dbClose(db)
end
Notes
- Available only in server-side resource scripts.