Raised This Month: $ Target: $400
 0% 

[SOLVED] SQLX problem... :(


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
pRED*
Join Date: Dec 2006
Old 06-14-2007 , 19:16   Re: [SOLVED] SQLX problem... :(
Reply With Quote #5

Just for future reference...

This is what I have inside my select query handler (after the error checking)

Code:
    if (!SQL_MoreResults(Query)) // No more results - User not found, create them a blank entry in the table. and zero their variables     {         for (new counter=0; counter<6; counter++)         {               g_PlayerBadges[id][counter] = 0 ;                     }         knifekills[id]=0         pistolkills[id]=0         sniperkills[id]=0         parakills[id]=0         totalkills[id]=0         defuses[id]=0         plants[id]=0         explosions[id]=0         format(g_Cache,511,"INSERT INTO bf2ranks VALUES('%s','0','0','0','0','0','0','0','0','0','0','0','0','0','0')",authid[id]);         SQL_ThreadQuery(g_SqlTuple,"QueryHandle",g_Cache)         return PLUGIN_CONTINUE;     }     //Player must have been found. Loop through and load the columns into the global vars     for (new counter=0; counter<6; counter++)     {           g_PlayerBadges[id][counter] = SQL_ReadResult(Query,counter)                   }     knifekills[id]=SQL_ReadResult(Query,6)     pistolkills[id]=SQL_ReadResult(Query,7)     sniperkills[id]=SQL_ReadResult(Query,8)     parakills[id]=SQL_ReadResult(Query,9)     totalkills[id]=SQL_ReadResult(Query,10)     defuses[id]=SQL_ReadResult(Query,11)     plants[id]=SQL_ReadResult(Query,12)     explosions[id]=SQL_ReadResult(Query,13)
pRED* is offline
 



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:00.


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