Raised This Month: $ Target: $400
 0% 

help sqlx


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thallysbar
Junior Member
Join Date: Oct 2007
Old 08-19-2009 , 18:34   help sqlx
Reply With Quote #1

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????????????????????????    } 
    } 
thallysbar is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 08-19-2009 , 18:36   Re: help sqlx
Reply With Quote #2

Here's an example:
Map Suggestions (SQL Support)
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
thallysbar
Junior Member
Join Date: Oct 2007
Old 08-19-2009 , 19:32   Re: help sqlx
Reply With Quote #3

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?
thallysbar is offline
|PJ| Shorty
Veteran Member
Join Date: Aug 2005
Location: Bavaria, Germany
Old 08-20-2009 , 04:32   Re: help sqlx
Reply With Quote #4

get the name from the db by steamid
compare the names
if not equal, change it.
__________________
There are only 10 types of people in the world:
Those who understand binary, and those who donīt.
|PJ| Shorty is offline
Send a message via ICQ to |PJ| Shorty Send a message via AIM to |PJ| Shorty Send a message via MSN to |PJ| Shorty Send a message via Yahoo to |PJ| Shorty Send a message via Skype™ to |PJ| Shorty
thallysbar
Junior Member
Join Date: Oct 2007
Old 08-20-2009 , 19:37   Re: help sqlx
Reply With Quote #5

example??
thallysbar is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 08-22-2009 , 01:45   Re: help sqlx
Reply With Quote #6

if you need more examples: http://forums.alliedmods.net/showpos...&postcount=240
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:35.


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