AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problems with SQL - dbi_result returns null (https://forums.alliedmods.net/showthread.php?t=11166)

Menion 03-11-2005 10:22

Problems with SQL - dbi_result returns null
 
I have a function that checks if a clan name exists in the database, and also returns the id of that clan... The query works fine. but dbi_result only returns null even if there's a result returned by dbi_query...

What could be the problem?

Code:
g_result = dbi_query(g_dbc,"SELECT id FROM clans WHERE name = '%s' LIMIT 1", clanCT) if (dbi_num_rows(g_result) < 1) {     console_print(id,"* Clan '%s' does not exist in database!", clanCT)     dberror = 1 } else {     dbi_nextrow(g_result)     dbi_result(g_result, "id", team_one_id) } dbi_free_result(g_result)

Thanks!


All times are GMT -4. The time now is 14:03.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.