DbClose: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 29: | Line 29: | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:Database Functions]] | [[Category:Database Functions]] | ||
Latest revision as of 09:52, 15 August 2026
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.