AlliedModders

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

thallysbar 08-19-2009 18:34

help sqlx
 
Hello everybody I need more help.
need to make this query on the db
and change the name of the player for what is
recorded in the db.



PHP Code:

public client_connect(id)
{
    new 
name[32]; 
    
get_user_name(idnamesizeof (name));
    new 
Handle:query SQL_PrepareQuery(g_sql"SELECT * FROM `admins` WHERE `name` = '%s'",name); 
    
SQL_Execute(query);
 
    new 
res[32]; 
    if (
SQL_MoreResults(query)) 
    { 
        
SQL_ReadResult(query0ressizeof (res)); 
        
SQL_FreeHandle(query); 
    } 
    if (!
strlen(res)) 
    { 
what I put here????????????????????????    } 
    } 


crazyeffect 08-19-2009 18:36

Re: help sqlx
 
Here's an example:
Map Suggestions (SQL Support)

thallysbar 08-19-2009 19:32

Re: help sqlx
 
sorry but did not understand your example:
I need the command to check if the name
the player is the same as recorded in the db
if not, it changes automatically.
example
I want the plugin to check steamid and name,
when the player enter and change the name of
the player that is recorded in the db.
understand?

|PJ| Shorty 08-20-2009 04:32

Re: help sqlx
 
get the name from the db by steamid
compare the names
if not equal, change it.

thallysbar 08-20-2009 19:37

Re: help sqlx
 
example??

AntiBots 08-22-2009 01:45

Re: help sqlx
 
if you need more examples: http://forums.alliedmods.net/showpos...&postcount=240


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

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