Raised This Month: $32 Target: $400
 8% 

SQL SYNTAX ERROR[UPDATED]


Post New Thread Reply   
 
Thread Tools Display Modes
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 08-03-2011 , 13:50   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #21

Quote:
Originally Posted by lucas_7_94 View Post
little array maybe?
what do you mean by little array?
davidto1995 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-03-2011 , 13:54   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #22

Quote:
Originally Posted by davidto1995 View Post
what do you mean by little array?
The output of your code is 3091 characters so you need an array big enough to handle that. So, you would need at least MSG[3092].
__________________
fysiks is offline
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 08-03-2011 , 14:27   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #23

Quote:
Originally Posted by fysiks View Post
The output of your code is 3091 characters so you need an array big enough to handle that. So, you would need at least MSG[3092].
array size changed.
btw
another error appeared
Code:
Plugin says: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
davidto1995 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-03-2011 , 14:30   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #24

What do those "CN_BOOL_IsUserHaveNickname_%d ENUM('0', '1')" fields do?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 08-03-2011 , 14:30   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #25

Quote:
Originally Posted by Exolent[jNr] View Post
What do those "CN_BOOL_IsUserHaveNickname_%d ENUM('0', '1')" fields do?
to save data(boolean)

ps: i am disheartened of this script..
davidto1995 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-03-2011 , 14:31   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #26

Are you using lucas's code? It won't work.
__________________
fysiks is offline
davidto1995
Member
Join Date: Jul 2010
Location: hong kong
Old 08-03-2011 , 14:33   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #27

Quote:
Originally Posted by fysiks View Post
Are you using lucas's code? It won't work.
yes...
why it won't work , it makes sense
davidto1995 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-03-2011 , 14:43   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #28

Quote:
Originally Posted by davidto1995 View Post
yes...
why it won't work , it makes sense
Quote:
Originally Posted by fysiks View Post
Also, note that in lucas's code the variable i will never be MAX_NICK.
Here is a better fix:

PHP Code:
    len += formatex(MSG[len], charsmax(MSG) - len"CREATE TABLE IF NOT EXISTS trmod (")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientName varchar(32), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientExp INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientFame INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientMoney INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientLevel INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientGoldCoin INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientNorNickGet INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientSeNickGet INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClientAch INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"ClinetNicknameID INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_CountKill INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_CountKillKnife INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_CountKillGrenade INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_CountKillAwp INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_MakeGunNum INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_TreasureNum INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_MakeClothingNum INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_ConnectTimeSec INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_ConnectTimeMin INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_ConnectTimeHour INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_DieTime INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_TreatmentNum INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_ItemHave INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_GiveMoneyNum INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_MetalResources INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_UseAudioTimes INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_ChangeEquipTimes INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_DropGunTimes INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_JumpTimes INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_CountFireMiunsHealth INT(11), ")
    
len += formatex(MSG[len], charsmax(MSG) - len"CN_CountWaterMiunsHealth INT(11)")

    for(new 
iMAX_NICKi++)
    {
        
len += formatex(MSG[len], charsmax(MSG) - len", CN_BOOL_IsUserHaveNickname_%i ENUM('0', '1')"i)
    }
    
len += formatex(MSG[len], charsmax(MSG) - len")"
Also note that the length is now 3141 with all the spaces (which probably can be removed).
__________________
fysiks is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-03-2011 , 15:00   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #29

new i doesnt should be new i = 0?
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 08-03-2011 , 15:09   Re: SQL SYNTAX ERROR[UPDATED]
Reply With Quote #30

PS : I execute the query in my phpmyadmin and the consult works perfect.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Reply


Thread Tools
Display Modes

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 19:10.


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