Home of the Ultimate Xbox 360 Modding Tool, Horizon. XboxMB.com is a community of Xbox 360 gamers and modders who share Tutorials, News, Reviews, and other resources. Xbox Message Boards is free to sign up and use, so what are you waiting for? Register Now!
Well I have had some people ask how I parse the XboxMB API and get it to work without having the put a username in. You need to be added to Cheaters whitelist for it to work with this method. Big thanks for Austin for helping me with a bit of PDO. For this I created a Database in MySQL which has the UserGroup ID as the primary key and then has columns for the other data like username.
"It is hard to fail, but it is worse never to have tried to succeed. We are all inventors, each departure on a guided journey of discovery, each with a private chart, of which there is no duplicate. The world is all gates, all opportunities."
Programming today is a race between software engineers striving to build bigger and better
idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
I would bind the UserID value to a prepared statement instead of adding it to the query. It defeats the purpose of using PDO.
Code:
$sth = $dbh->prepare('SELECT * FROM users WHERE UserID = :UserID')->execute(array(':UserID', $result['UserID']));
It's a good habit to get in to because it completely eliminates SQL injection. Even though the user ID is coming from XboxMB, you never know what may happen.
I would bind the UserID value to a prepared statement instead of adding it to the query. It defeats the purpose of using PDO.
Code:
$sth = $dbh->prepare('SELECT * FROM users WHERE UserID = :UserID')->execute(array(':UserID', $result['UserID']));
It's a good habit to get in to because it completely eliminates SQL injection. Even though the user ID is coming from XboxMB, you never know what may happen.
Yeah I used to use something like that but Austin said it wasn't good for server to keep being parsed every time for everything so he told me to create DB to store it in. Thanks for the tip I will add it now.
__________________
"It is hard to fail, but it is worse never to have tried to succeed. We are all inventors, each departure on a guided journey of discovery, each with a private chart, of which there is no duplicate. The world is all gates, all opportunities."
Yeah I used to use something like that but Austin said it wasn't good for server to keep being parsed every time for everything so he told me to create DB to store it in. Thanks for the tip I will add it now.
That also explained my question of why adding it to a database
Programming today is a race between software engineers striving to build bigger and better
idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
That also explained my question of why adding it to a database
Just noticed your question. Sorry for missing you. I also find it easier to use it from DB as it's an array.
__________________
"It is hard to fail, but it is worse never to have tried to succeed. We are all inventors, each departure on a guided journey of discovery, each with a private chart, of which there is no duplicate. The world is all gates, all opportunities."