sqlite_close
From Liberty Unleashed Wiki
Note: This function requires the external module lu_sqlite.
This function closes a previously opened SQLite database.
Syntax
bool sqlite_close( UserPointer database )
Arguments
- database - This is a pointer to a previously opened database
Example
When the scripts unload, it will close the previously opened database.
function onScriptLoad() { LoadModule( "lu_sqlite" ); pSQDatabase <- sqlite_open( "database.sqlite" ); return 1; } function onScriptUnload() { sqlite_close( pSQDatabase ); return 1; }
Notes
The function LoadModule and sqlite_open and event onScriptLoad and onScriptUnload were used in this example. More info about them in the corresponding pages.
For a larger example, check the SQLite database example from the wiki tutorials.
Related Functions
These functions are provided by the official module lu_sqlite.