Raised This Month: $ Target: $400
 0% 

Sql syntax working...sometimes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zeus
Senior Member
Join Date: Jul 2008
Old 05-01-2011 , 05:12   Sql syntax working...sometimes
Reply With Quote #1

PHP Code:
new szTemp512 ]
    
    
formatexszTempcharsmaxszTemp ),
    
"INSERT INTO `%s` ('name','password','email','status') VALUES ('%s','%s','%s','Online')"gTng_szNameid ], g_szPasswordid ], g_szEmailid ] )
    
    
SQL_ThreadQueryg_SqlTuple"IgnoreHandle"szTemp 
The thing is that most of the time it works
But when I check the database there are some rows where there is no password
g_szPassword[ id ] is allways alphanumeric ( md5 hash )
The column size for the password is correct varchar(32)
It parses the name corectly, the email and the status but the password sometimes not
Any ideas?
zeus is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-01-2011 , 06:57   Re: Sql syntax working...sometimes
Reply With Quote #2

Well, you could add a fail check, check if strlen(g_szPassword[id]) > 0 and log an error... or if it's not that frequently called, you should log every insert and see where it doesn't insert it.
__________________
Hunter-Digital is offline
zeus
Senior Member
Join Date: Jul 2008
Old 06-16-2011 , 03:48   Re: Sql syntax working...sometimes
Reply With Quote #3

Found the problem
formatex does not perform a "copy back" check.
zeus is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-16-2011 , 12:01   Re: Sql syntax working...sometimes
Reply With Quote #4

Yes it doesn't... but you don't have a copyback in that code.
__________________
Hunter-Digital is offline
zeus
Senior Member
Join Date: Jul 2008
Old 06-16-2011 , 15:13   Re: Sql syntax working...sometimes
Reply With Quote #5

Oh well...I'll wait and see
If it happens again with format I'll probably suicide
zeus is offline
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 04:22.


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