SA-MP Forums Archive
[Tutorial] [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] (/showthread.php?tid=574714)

Pages: 1 2 3


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Problems - 16.06.2016

I compiled and everything was going alright then i tried to register i only can register one account with ID 0 then that "OnAccountRegister" isn't called again for any other accounts and doesn't create any accounts.


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - AndySedeyn - 18.06.2016

Quote:
Originally Posted by Problems
View Post
I compiled and everything was going alright then i tried to register i only can register one account with ID 0 then that "OnAccountRegister" isn't called again for any other accounts and doesn't create any accounts.
Can you post your recent MySQL log?


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Ankon - 02.07.2016

Nice tutorial friend. But for example I have a variable "gTeam" and it stores the player's team. So how should I save it to the MySQL database?


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - faizal16 - 30.10.2016

I have A Problem..when failed login or exit the game in login. automatic save spawn in Blubberry farm / login camera ...when I do not succeed login Sorry, my English is bad


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Tenka - 01.12.2016

It's normally?

Quote:

[13:08:36 12/01/16] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `accounts` SET `Money` = %d, `PosX` = %f, `PosY` = %f, `PosZ` = %f, `PosA` = %f WHERE `ID` = %d"
[13:08:36 12/01/16] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `accounts` SET `Money` = 0, `PosX` = -46.933, `PosY` = -7", callback: "(null)", format: "(null)"
[13:08:36 12/01/16] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[13:08:36 12/01/16] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 42.511 milliseconds
[13:08:36 12/01/16] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
[13:08:48 12/01/16] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "server", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[13:08:48 12/01/16] [DEBUG] CMySQLHandle::Create - creating new connection..
[13:08:48 12/01/16] [WARNING] CMySQLHandle::Create - connection already exists
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:08:48 12/01/16] [DEBUG] mysql_errno - connection: 1
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - connection was successful
[13:08:48 12/01/16] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `Password`, `ID` FROM `accounts` WHERE `Name` = '%e' LIMIT 1"
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
FROM `accounts` WHERE `Name` = 'Woody' L", callback: "OnAccountCheck", format: "i"
[13:08:48 12/01/16] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[13:08:48 12/01/16] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - starting query execution
[13:08:48 12/01/16] [DEBUG] CMySQLQuery::Execute[OnAccountCheck] - query was successfully executed within 0.280 milliseconds
[13:08:48 12/01/16] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[13:08:48 12/01/16] [DEBUG] Calling callback "OnAccountCheck"..
[13:08:48 12/01/16] [DEBUG] cache_get_data - connection: 1
[13:08:48 12/01/16] [DEBUG] cache_get_field_content - row: 0, field_name: "Password", connection: 1, max_len: 129
[13:08:48 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Password", data: "CCE08BBA3F2E3C029CD257104B06D4B075772D5F514CF1B77 89506F9A69D53C51464881D2C18445AB290553B302F67A24B1 C69E3E737A46215DEAF43517E4960"
[13:08:48 12/01/16] [DEBUG] cache_get_field_content_int - row: 0, field_name: "ID", connection: 1
[13:08:48 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "ID", data: "1"
[13:08:48 12/01/16] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[13:08:53 12/01/16] [DEBUG] mysql_format - connection: 1, len: 100, format: "SELECT * FROM `accounts` WHERE `Name` = '%e' LIMIT 1"
[13:08:53 12/01/16] [DEBUG] mysql_tquery - connection: 1, query: "SELECT * FROM `accounts` WHERE `Name` = 'Woody' LIMIT 1", callback: "OnAccountLoad", format: "i"
[13:08:53 12/01/16] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - starting query execution
[13:08:53 12/01/16] [DEBUG] CMySQLQuery::Execute[OnAccountLoad] - query was successfully executed within 0.350 milliseconds
[13:08:53 12/01/16] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
[13:08:53 12/01/16] [DEBUG] Calling callback "OnAccountLoad"..
[13:08:53 12/01/16] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Admin", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Admin", data: "0"
[13:08:54 12/01/16] [DEBUG] cache_get_field_content_int - row: 0, field_name: "VIP", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "VIP", data: "0"
[13:08:54 12/01/16] [DEBUG] cache_get_field_content_int - row: 0, field_name: "Money", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "Money", data: "0"
[13:08:54 12/01/16] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosX", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosX", data: "-46.933"
[13:08:54 12/01/16] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosY", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosY", data: "-7.618"
[13:08:54 12/01/16] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosZ", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosZ", data: "3.109"
[13:08:54 12/01/16] [DEBUG] cache_get_field_content_float - row: 0, field_name: "PosA", connection: 1
[13:08:54 12/01/16] [DEBUG] CMySQLResult::GetRowDataByName - row: '0', field: "PosA", data: "325.763"
[13:08:54 12/01/16] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called




Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - AndySedeyn - 01.12.2016

Yes, that's normal. This tutorial sets logging on LOG_ALL, which means that everything will be logged.

Check this out for the different log levels: https://sampwiki.blast.hk/wiki/MySQL/R33#mysql_log


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Dorito - 04.12.2016

Would be great if you showed people how to salt their passwords for extra protection.


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - KNIGHT786 - 07.12.2016

enum
{
LoginDialog,
RegisterDialog
};
where to put this?


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Yaa - 07.12.2016

UP the gamemode after includes and defines and before public functions


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - eikzdej - 14.01.2017

Can someone update this tutorial upto R41-2? Thanks!


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Lordzy - 14.01.2017

Quote:
Originally Posted by eikzdej
View Post
Can someone update this tutorial upto R41-2? Thanks!
If you know how to use R33, conversion will be quite easy - https://sampforum.blast.hk/showthread.php?tid=616103

NOTE : Please check my post on 4th page of that topic. maddinat0r haven't yet fixed a mistake on using cache_get_value_index_int.


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - eikzdej - 14.01.2017

Quote:
Originally Posted by Lordzy
View Post
If you know how to use R33, conversion will be quite easy - https://sampforum.blast.hk/showthread.php?tid=616103

NOTE : Please check my post on 4th page of that topic. maddinat0r haven't yet fixed a mistake on using cache_get_value_index_int.
I see, but it is still okay to use versions before r40?


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - Lordzy - 14.01.2017

Quote:
Originally Posted by eikzdej
View Post
I see, but it is still okay to use versions before r40?
It is, unless there are any security related issues with the previous versions of MySQL plugin. But I wouldn't recommend using old versions.


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - justinnater - 18.01.2017

I wonder why almost every script/tutorial the databases are not normalized at all....


Re: [UPDATED 19/05/2015]MySQL Registration System [Threaded Queries + Whirlpool] - JudyMoody - 24.03.2018

money and score do not save help.