Raised This Month: $ Target: $400
 0% 

Sql Queries


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 11-30-2010 , 18:20   Re: Sql Queries
Reply With Quote #1

Show here the lines on that g_SqlConnection is used.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
zeus
Senior Member
Join Date: Jul 2008
Old 11-30-2010 , 18:26   Re: Sql Queries
Reply With Quote #2

Code:
new Handle:g_SqlConnection
public MySql_Init()
{
    g_SqlTuple = SQL_MakeDbTuple(Host,User,Pass,Db)
    new ErrorCode
    g_SqlConnection=SQL_Connect(g_SqlTuple,ErrorCode,g_Error,charsmax(g_Error))
    if(g_SqlConnection == Empty_Handle)
        set_fail_state(g_Error)
    SQL_FreeHandle(g_SqlConnection)
}

public Load_MySql(id)
{
    new szSteamId[32], szTemp[512]
    get_user_authid(id, szSteamId, charsmax(szSteamId))
    
    new Data[1]
    Data[0] = id
    
    format(szTemp,charsmax(szTemp),
    "SELECT * FROM `%s` \ 
    WHERE (`%s`.`authid` = '%s')",
    gTn,gTn,szSteamId);
    SQL_ThreadQuery(g_SqlTuple,"register_client",szTemp,Data,1)
    
    SQL_FreeHandle(g_SqlConnection)
}
zeus is offline
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 11:20.


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