1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 22:17:45 +00:00

Small acc creation fixes;

This commit is contained in:
Maru 2017-10-30 01:17:49 -02:00
parent 42df7b7d13
commit 42c3becd8f
2 changed files with 3 additions and 3 deletions

View file

@ -362,7 +362,7 @@ namespace Core {
uint64_t PlayerMinimal::getNextUId64() const
{
g_charaDb.execute( std::string( "INSERT INTO uniqueiddata( IdName ) VALUES( 'NOT_SET' );" ) );
g_charaDb.directExecute( std::string( "INSERT INTO uniqueiddata( IdName ) VALUES( 'NOT_SET' );" ) );
auto res = g_charaDb.query( "SELECT LAST_INSERT_ID();" );
if( !res )

View file

@ -88,7 +88,7 @@ bool Core::Network::SapphireAPI::createAccount( const std::string& username, con
// get account from login name
auto pQR = g_charaDb.query( "SELECT account_id FROM accounts WHERE account_name = '" + username + "';" );
// found?
if( !pQR->next() )
if( pQR->next() )
return false;
// we are clear and can create a new account
@ -99,7 +99,7 @@ bool Core::Network::SapphireAPI::createAccount( const std::string& username, con
uint32_t accountId = pQR->getUInt( 1 ) + 1;
// store the account to the db
g_charaDb.execute( "INSERT INTO accounts (account_Id, account_name, account_pass, account_created) VALUE( " +
g_charaDb.directExecute( "INSERT INTO accounts (account_Id, account_name, account_pass, account_created) VALUE( " +
std::to_string( accountId ) + ", '" +
username + "', '" +
pass + "', " +