mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +01:00
timestamp records on creation
This commit is contained in:
parent
ded6e22180
commit
100ed8532f
1 changed files with 5 additions and 2 deletions
|
@ -64,6 +64,9 @@ DBMgr::~DBMgr()
|
|||
{
|
||||
logf( XW_LOGINFO, "%s called", __func__ );
|
||||
PQfinish( m_pgconn );
|
||||
|
||||
assert( s_instance == this );
|
||||
s_instance = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -76,8 +79,8 @@ DBMgr::AddNew( const char* cookie, const char* connName, CookieID cid,
|
|||
if ( !connName ) connName = "";
|
||||
|
||||
const char* fmt = "INSERT INTO games "
|
||||
"(cid, cookie, connName, nTotal, nHere, lang) "
|
||||
"VALUES( %d, '%s', '%s', %d, %d, %d )";
|
||||
"(cid, cookie, connName, nTotal, nHere, lang, ctime) "
|
||||
"VALUES( %d, '%s', '%s', %d, %d, %d, 'now' )";
|
||||
char buf[256];
|
||||
snprintf( buf, sizeof(buf), fmt, cid/*m_nextCID++*/, cookie, connName,
|
||||
nPlayersT, nPlayersH, langCode );
|
||||
|
|
Loading…
Add table
Reference in a new issue