Core/DBLayer:
- A few prepared statement implementations in authsocket as example. - Add an ASSERT in MySQLConnection::Execute(PreparedStatement*) to catch faulty created statements --HG-- branch : trunk
This commit is contained in:
1 parent
2c1c391597
commit
7982cc0f7d
4 files changed
+26
-3
No files matched your search
@@ -20,11 +20,18 @@
|
||||
|
||||
bool LoginDatabaseConnection::Open(const std::string& infoString)
|
||||
{
|
||||
if (!MySQLConnection::Open(infoString))
|
||||
return false;
|
||||
|
||||
m_stmts.resize(MAX_LOGINDATABASE_STATEMENTS);
|
||||
|
||||
/*
|
||||
##################################
|
||||
LOAD YOUR PREPARED STATEMENTS HERE
|
||||
##################################
|
||||
*/
|
||||
PrepareStatement(LOGIN_SET_VS, "UPDATE account SET v = ?, s = ? WHERE username = ?");
|
||||
PrepareStatement(LOGIN_SET_LOGONPROOF, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0 WHERE username = ?");
|
||||
|
||||
return MySQLConnection::Open(infoString);
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user