Raised This Month: $ Target: $400
 0% 

[MySQL] Save / Laod problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 08-11-2011 , 14:33   Re: [MySQL] Save / Laod problem
Reply With Quote #1

Here:

PHP Code:
public plugin_precache() {
    
MySQL_Tuple SQL_MakeDbTuple(HostUserPassDb)
    
    
format(MySQL_Querycharsmax(MySQL_Query), "CREATE TABLE IF NOT EXISTS EuroMod (steamid varchar(32),totalEuro INT(11), Euro INT(11), name varchar(32), rollwins INT(11))")
    
SQL_ThreadQuery(MySQL_Tuple"SQL_TrashHandler"MySQL_Query)
    
    new 
szTemp[1900];
    new 
a;
    for(
a=0g_iItemCounta++) {
        
formatex(szTempcharsmax(szTemp), "%s`%i` INT(11), "szTempa);
    }
    
    for(new 
i=0g_iWeapCounti++) {    
        if( (
== g_iWeapCount-1) ) 
            
formatex(szTempcharsmax(szTemp), "%s`%i` INT(11)"szTempi+a);
            
        else
            
formatex(szTempcharsmax(szTemp), "%s`%i` INT(11), "szTempi+a);
    }
    
    
format(MySQL_Querycharsmax(MySQL_Query), "CREATE TABLE IF NOT EXISTS EuroModItems (steamid varchar(32), %s)"szTemp);
    
SQL_ThreadQuery(MySQL_Tuple"SQL_TrashHandler"MySQL_Query)
    

__________________
Retired.
Xalus is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-11-2011 , 14:49   Re: [MySQL] Save / Laod problem
Reply With Quote #2

You should either use SQL_FieldNameToNum() to know which columns you are getting, or properly set them in your SELECT statement.
Otherwise, you may be getting the wrong columns.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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:30.


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