23.10.2010, 04:41
What should I do, open the database on the server start and close it on the server exit or open it only when I'm making a query?
This:
Or this:
This:
pawn Код:
public OnGameModeInit()
{
db_open("mydatabase.sqlite");
return 1;
}
public OnGameModeExit()
{
db_close(db_var);
return 1;
}
pawn Код:
public OnPlayerConnect()
{
db_open("name.sqlite");
// query and code
db_close(db_var);
return 1;
}