Guilds - Bug of the Day

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Guilds - Bug of the Day

Post by John Adams » Mon Apr 04, 2011 10:26 am

Scatoooo, I cannot figure this one out. The SQL inserts look fine, yet the date appears to have slid?

Code: Select all

void WorldDatabase::SaveGuild(Guild* guild, bool new_guild) {
	if (guild) {
		Query query;
		if (new_guild) {
			query.RunQuery2(Q_INSERT, "INSERT INTO `guilds` (`name`, `motd`, `level`, `xp`, `xp_needed`, `formed_on`) VALUES ('%s', '%s', %u, %u, %u, %u)", getSafeEscapeString(guild->GetName()).c_str(), getSafeEscapeString(guild->GetMOTD()).c_str(), guild->GetLevel(), guild->GetEXPCurrent(), guild->GetEXPToNextLevel(), guild->GetFormedDate());
			guild->SetID(query.GetLastInsertedID());
		}
		else
			query.RunQuery2(Q_UPDATE, "UPDATE `guilds` SET `name`='%s', `motd`='%s', `level`=%u, `xp`=%u, `xp_needed`=%u, `formed_on`=%u WHERE `id`=%u", getSafeEscapeString(guild->GetName()).c_str(), getSafeEscapeString(guild->GetMOTD()).c_str(), guild->GetLevel(), guild->GetEXPCurrent(), guild->GetEXPToNextLevel(), guild->GetFormedDate(), guild->GetID());
		guild->SetSaveNeeded(false);
	}
}
guildformedon.jpg
Results in bad date value for Formed On.


I am at work, and cannot debug this now. Just posting it as a bug.
You do not have the required permissions to view the files attached to this post.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests