===========================================================
Modify Ghost++ to save replay in following format (by game id):
Ghost++ GAME_ID.w3g
===========================================================
uakf.b solution:
http://www.codelain.com/forum/index.php?topic=14297.msg108849#msg108849

Note: Openstats will automatically find replay with this name format.
===========================================================
Ghost++ Modification:

In game_base.h, add
uint32_t m_DatabaseID;                          // the ID number from the database, which we'll use to save replay

In game_base.cpp, add m_DatabaseID = 0; to the constructor and

		m_Replay->BuildReplay( m_GameName, m_StatString, m_GHost->m_ReplayWar3Version, m_GHost->m_ReplayBuildNumber );
-		m_Replay->Save( m_GHost->m_TFT, m_GHost->m_ReplayPath + UTIL_FileSafeName( "GHost++ " + string( Time ) + " " + m_GameName + " (" + MinString + "m" + SecString + "s).w3g" ) );
+	    if(m_DatabaseID == 0) {
+		    m_Replay->Save( m_GHost->m_TFT, m_GHost->m_ReplayPath + UTIL_FileSafeName( "GHost++ " + string( Time ) + " " + m_GameName + " (" + MinString + "m" + SecString + "s).w3g" ) );
+		} else {
+		    m_Replay->Save( m_GHost->m_TFT, m_GHost->m_ReplayPath + UTIL_FileSafeName( "GHost++ " + UTIL_ToString( m_DatabaseID ) + ".w3g" ) );
+		}
 	}

Then in game.cpp
	if( m_CallableGameAdd && m_CallableGameAdd->GetReady( ) )
 	{
+	    m_DatabaseID = m_CallableGameAdd->GetResult();
 		if( m_CallableGameAdd->GetResult( ) > 0 )
 		{
 			CONSOLE_Print( "[GAME: " + m_GameName + "] saving player/stats data to database" );
===========================================================

So you'll get an output like "Ghost++ 100.w3g"