Fix wrong sql statement in offline im.

user_profiles
Diva Canto 2013-04-28 09:03:09 -07:00
parent a49c5291dc
commit a517e597f5
1 changed files with 2 additions and 5 deletions

View File

@ -47,12 +47,9 @@ namespace OpenSim.Data.MySQL
public void DeleteOld() public void DeleteOld()
{ {
uint now = (uint)Util.UnixTimeSinceEpoch();
using (MySqlCommand cmd = new MySqlCommand()) using (MySqlCommand cmd = new MySqlCommand())
{ {
cmd.CommandText = String.Format("delete from {0} where TMStamp < ?tstamp", m_Realm); cmd.CommandText = String.Format("delete from {0} where TMStamp < NOW() - INTERVAL 2 WEEK", m_Realm);
cmd.Parameters.AddWithValue("?tstamp", now - 14 * 24 * 60 * 60); // > 2 weeks old
ExecuteNonQuery(cmd); ExecuteNonQuery(cmd);
} }