AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   SQL (https://forums.alliedmods.net/showthread.php?t=56773)

bwgrubbs1 06-20-2007 17:07

SQL
 
I am using my point system on my server, and if server crashes or client crashes all the points of player or players in server are lost...

I just want an example of saving using sql...

such as connecting to database.
...save steam-id and points in db
...load steam-id and points from db
...check if steam-id existed in db from before.
...anything else...just a sample...i need it for multiple plugins...

I understand this...
Code:
#include <amxmodx> #include <amxmisc> #include <dbi> public plugin_init() {     new Host[64],User[64],Pass[64],Db[64]     get_cvar_string("amx_sql_host",Host,63)     get_cvar_string("amx_sql_user",User,63)     get_cvar_string("amx_sql_pass",Pass,63)     get_cvar_string("amx_sql_db",Db,63) }

HOW do I access a table in my database...and save information into it...and retrieve information from it ?


All times are GMT -4. The time now is 21:26.

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