Raised This Month: $ Target: $400
 0% 

SQL Querying


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kryzu
Senior Member
Join Date: Feb 2009
Old 05-09-2010 , 15:49   SQL Querying
Reply With Quote #1

Hey!

I've a problem with SQL querying.

Here's my code:
PHP Code:
public client_putinserver(id)
{
    if( 
is_user_hltv(id) || is_user_bot(id) )
    {
        return 
PLUGIN_CONTINUE;
    }
    
    
get_user_authidid g_PDataid ][ AuthID ] , charsmaxg_PData[][ AuthID ] ) );

    new 
cData];
    
cData] = id;
    
    new 
createinto[1001]
    
formatex(createinto1000"SELECT num FROM kz_procount WHERE authid='%s' LIMIT 1"g_PDataid ][ AuthID ]  )
    
SQL_ThreadQuery(g_SqlTuple"Get_ProCountHandle"createintocData1)
    
    return 
PLUGIN_CONTINUE;
    
}
public 
Get_ProCountHandle(iFailStateHandle:hQueryszError[], iErrnumcData[], iSizeFloat:fQueueTime)
{
    if( 
iFailState != TQUERY_SUCCESS )
    {
    return 
log_amx("SQL: SQL Error #%d - %s"iErrnumszError)
    }
    
    new 
id cData[0]
    
    if( 
SQL_MoreResults(hQuery) )
    {
        
SQL_ReadResult(hQuery0g_PDataid ][ Records ], 32)
        
        
//client_print...
    
    
}
    
    return 
PLUGIN_CONTINUE;  

__________________
Kryzu 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 03:38.


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