core/smn_database.cpp
changeset 1324 9d1983bf06c7
parent 1317 a2a64027311e
child 1330 ab94316bb52b
     1.1 --- a/core/smn_database.cpp	Tue Aug 14 00:53:39 2007 +0000
     1.2 +++ b/core/smn_database.cpp	Tue Aug 14 01:00:42 2007 +0000
     1.3 @@ -1256,11 +1256,20 @@
     1.4  	return driver->GetHandle();
     1.5  }
     1.6  
     1.7 +static cell_t SQL_CheckConfig(IPluginContext *pContext, const cell_t *params)
     1.8 +{
     1.9 +	char *name;
    1.10 +	pContext->LocalToString(params[1], &name);
    1.11 +
    1.12 +	return (g_DBMan.FindDatabaseConf(name) != NULL) ? 1 : 0;
    1.13 +}
    1.14 +
    1.15  REGISTER_NATIVES(dbNatives)
    1.16  {
    1.17  	{"SQL_BindParamInt",		SQL_BindParamInt},
    1.18  	{"SQL_BindParamFloat",		SQL_BindParamFloat},
    1.19 -	{"SQL_BindParamString",		SQL_BindParamString},
    1.20 +	{"SQL_BindParamString",		SQL_BindParamString},\
    1.21 +	{"SQL_CheckConfig",			SQL_CheckConfig},
    1.22  	{"SQL_Connect",				SQL_Connect},
    1.23  	{"SQL_ConnectEx",			SQL_ConnectEx},
    1.24  	{"SQL_Execute",				SQL_Execute},