MySQL Help - Threaded Queries.
#1

Alright so I was following a tutorial, and it didn't work out.
I tried to cut out as much of my Gamemode as I could, so I would only show the SQL
But if I Removed something important please let me know.

My Issue:
All new accounts state Please Login instead of Register.
I was able to register one account, but then when I went to login the password was 'Invalid'
After correcting that issue, this issue came about. However, the password used for the original
account I was initially able to register, is now the 'correct' password for all new accounts that state
to Login to the server. Not sure what's wrong, but I am in a pickle.

Here is a Screenshot of my PHPmyAdmin as-well. I'm unable to delete this player.
The Username I registered wasn't called 0 either, FYI.

http://i.imgur.com/fYah8Gx.png

This is the SQL Code:
REMOVED

MySQL Log:
Code:
[13:23:51] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "server", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[13:23:51] [DEBUG] CMySQLHandle::Create - creating new connection..
[13:23:51] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[13:23:51] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[13:23:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:23:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:23:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:23:51] [DEBUG] mysql_errno - connection: 1
[13:23:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:23:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:23:51] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:23:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:23:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:23:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:23:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:23:51] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:23:51] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:24:17] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Password`, `ID` FROM `players` WHERE `Username` = '%e' LIMIT 1"
[13:24:17] [DEBUG] mysql_tquery - connection: 1, query: "SELECT `Password`, `ID` FROM `players` WHERE `Username` = 'rawr'", callback: "OnAccountCheck", format: "i"
[13:24:17] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution
[13:24:17] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.599 milliseconds
[13:24:17] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[13:24:17] [DEBUG] Calling callback "OnAccountCheck"..
[13:24:17] [DEBUG] cache_get_data - connection: 1
[13:24:17] [DEBUG] cache_get_field_content - row: 0, field_name: "Password", connection: 1, max_len: 129
[13:24:17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Password", data: "7420FB7CF19899AD083B6B5239B62E7FCE055C6EBA345C331EC9F25751E770085C6F2EC5E68B3121A05320154439DAE5FE50ADBBC30EAF97E2A7D1A71F99AB9E"
[13:24:17] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
[13:24:17] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "0"
[13:24:17] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[13:24:22] [DEBUG] mysql_format - connection: 1, len: 100, format: "SELECT * FROM `players` WHERE `Username` = '%e' LIMIT 1"
[13:24:22] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `players` WHERE `Username` = 'rawr' LIMIT 1", callback: "OnAccountLoad", format: "i"
[13:24:22] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - starting query execution
[13:24:22] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.745 milliseconds
[13:24:22] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[13:24:22] [DEBUG] Calling callback "OnAccountLoad"..
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Score", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Score", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Admin", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Admin", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Cash", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Cash", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Banned", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Banned", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Kills", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Kills", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Deaths", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Deaths", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Job", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Job", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Rank", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Rank", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosX", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosX", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosY", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosY", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosZ", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosZ", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosA", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosA", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Interior", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Interior", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "World", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "World", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Faction", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Faction", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "CarKey", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "CarKey", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "BizKey", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "BizKey", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Skin", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Skin", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Weapon", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Weapon", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Licenses", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Licenses", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "IsNew", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "IsNew", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_float - row: 0, field_name: "Armour", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Armour", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_float - row: 0, field_name: "Health", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Health", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Dead", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Dead", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Warnings", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Warnings", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "RubberRounds", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "RubberRounds", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "PhoneNum", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PhoneNum", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "BankAccount", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "BankAccount", data: "0"
[13:24:22] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Donator", connection: 1
[13:24:22] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Donator", data: "0"
[13:24:22] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[13:24:27] [DEBUG] mysql_format - connection: 1, len: 2000, format: "UPDATE `players` SET `Score`=%d, `Admin`=%d,`Cash`=%d,`Banned`=%d,`Kills`=%d,`Deaths`=%d,`Job`=%d,`Rank`=%d,`PosX`=%f,`PosY`=%f,..."
[13:24:27] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `players` SET `Score`=0, `Admin`=0,`Cash`=0,`Banned`=0,`K", callback: "(null)", format: "(null)"
[13:24:27] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[13:24:27] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 1.471 milliseconds
[13:24:27] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
Reply
#2

Read the blue box. "ID" should be auto increment and the primary key.
Reply
#3

Not sure how that got changed, as I set it when I first began the tutorial.
Accounts now register, and login.
However, new accounts Spawn at the X Y Z of the first account.
After that, they spawn where they should(Last log out.)
Reply
#4

What is your SAMP name?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)