1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-24 21:57:44 +00:00

Merge pull request #161 from itsMaru/SQL_REWRITE_OWN

Small acc creation fixes;
This commit is contained in:
Mordred 2017-10-30 22:06:51 +01:00 committed by GitHub
commit c41353cf4f
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 + "', " +