MYSQL Load Fail
Sometimes on my server mysql does'nt load the stats of the player and reset them.
PHP Code:
PHP Code:
|
Re: MYSQL Load Fail
Show where you are defining g_SqlTuple
|
Re: MYSQL Load Fail
PHP Code:
|
Re: MYSQL Load Fail
1. You don't need SqlConnection in Load_MySql.
2. About the main problem I can only guess because you didn't post whole code: You used something like this (from this bad tutorial): PHP Code:
Solution: PHP Code:
|
Re: MYSQL Load Fail
Okay, i think that works, but then i have to change
PHP Code:
PHP Code:
|
Re: MYSQL Load Fail
No, because it is possible that Save_MySql will be called after authorization, but before getting reply from database and in that case player will lose his points.
PHP Code:
|
Re: MYSQL Load Fail
Ah ok, i understand.. thanks.
|
Re: MYSQL Load Fail
Mhh, i found a new big bug on that plugin.
Every time when this player plays on our server: PHP Code:
http://www.pingstars-gaming.de/deathrun/toplist.php Maybe it's because the ' or the #, i don't know. It changes all names in the database to his one, the bug does'nt happens on displaying the database, it's changed on all playernames, the rest of the data is correct. |
Re: MYSQL Load Fail
It's probably because of the '. You have to escape MySQL special characters in your queries otherwise an attacker might even get control over your server where MySQL ist running.
Since I can't see any escape function in the includes, you will have to do this yourself. Replace characters like ' " etc. (I don't know all of them myself, but just google for MySQL injection) through something different. Maybe their respective hex codes or something. |
Re: MYSQL Load Fail
It seems that I forgot to mention that before. Just as issen1 said, you need to back-quote names and other strings that may contain invalid characters.
You can do it using SQL_QuoteString like this: PHP Code:
|
| All times are GMT -4. The time now is 10:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.