title: Help me with some c++ code
body: <p>I only want it to update server_record. Dont send any messgaes. What can I remove so it dont say "New record of players online is: 2839". Can I remove everything under query.str("");? I have no idea what char buffer[50]; do. I dont wanna mess anything up. And How can u get current time in c++? I want to insert the current time in the table too. To se when record was set.</p>
  
  <pre><code>void Game::checkPlayersRecord()
  {
  if(getPlayersOnline() &gt; lastPlayersRecord){
      Database* db = Database::instance();
      DBQuery query;
  
      lastPlayersRecord = getPlayersOnline();
      query &lt;&lt; "UPDATE `server_record` SET `record` = " &lt;&lt; lastPlayersRecord &lt;&lt; ";";
      db-&gt;executeQuery(query.str());
      query.str("");
  
      char buffer[50];
      sprintf(buffer, "New record of players online is: %d", lastPlayersRecord);
      AutoList&lt;Player&gt;::listiterator it = Player::listPlayer.list.begin();
      while(it != Player::listPlayer.list.end()){
          (*it).second-&gt;sendTextMessage(MSG_EVENT_ADVANCE, buffer);
          ++it;
      }
  }
  }
  </code></pre>