Added dbi_type()

This commit is contained in:
David Anderson
2004-05-28 09:21:11 +00:00
parent 55b57ca0cb
commit 9627b4803d
3 changed files with 58 additions and 6 deletions

View File

@ -296,6 +296,12 @@ static cell AMX_NATIVE_CALL mssql_error(AMX *amx, cell *params)
return lastError;
}
static cell AMX_NATIVE_CALL dbi_type(AMX *amx, cell *params)
{
return MF_SetAmxString(amx, params[1], "mssql", params[2]);
}
void OnAmxxAttach()
{
MF_AddNatives(mssql_Natives);
@ -326,6 +332,7 @@ AMX_NATIVE_INFO mssql_Natives[] = {
{"dbi_nextrow", mssql_nextrow},
{"mssql_error", mssql_error},
{"dbi_error", mssql_error},
{"dbi_type", dbi_type},
{NULL, NULL},
///////////////////

View File

@ -250,6 +250,11 @@ static cell AMX_NATIVE_CALL pgsql_close(AMX *amx, cell *params)
return 1;
}
static cell AMX_NATIVE_CALL dbi_type(AMX *amx, cell *params)
{
return MF_SetAmxString(amx, params[1], "pgsql", params[2]);
}
void OnAmxxAttach()
{
MF_AddNatives(pgsql_exports);
@ -262,6 +267,7 @@ AMX_NATIVE_INFO pgsql_exports[] = {
{"dbi_nextrow", pgsql_nextrow},
{"dbi_close", pgsql_close},
{"dbi_getfield", pgsql_getfield},
{"dbi_type", dbi_type},
{"pgsql_connect", pgsql_connect},
{"pgsql_error", pgsql_error},
{"pgsql_query", pgsql_query},