Changeset 260 for trunk/src/game/GMTicketMgr.h
- Timestamp:
- 11/21/08 08:47:55 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/GMTicketMgr.h
r229 r260 51 51 m_text = text ? text : ""; 52 52 m_lastUpdate = time(NULL); 53 CharacterDatabase.PExecute("UPDATE character_ticket SET ticket_text = '%s' WHERE guid = '%u'", m_text.c_str(), m_guid); 53 54 std::string escapedString = m_text; 55 CharacterDatabase.escape_string(escapedString); 56 CharacterDatabase.PExecute("UPDATE character_ticket SET ticket_text = '%s' WHERE guid = '%u'", escapedString.c_str(), m_guid); 54 57 } 55 58 … … 63 66 CharacterDatabase.BeginTransaction(); 64 67 DeleteFromDB(); 65 CharacterDatabase.PExecute("INSERT INTO character_ticket (guid, ticket_text) VALUES ('%u', '%s')", m_guid, GetText()); 68 69 std::string escapedString = m_text; 70 CharacterDatabase.escape_string(escapedString); 71 72 CharacterDatabase.PExecute("INSERT INTO character_ticket (guid, ticket_text) VALUES ('%u', '%s')", m_guid, escapedString.c_str()); 66 73 CharacterDatabase.CommitTransaction(); 67 74 }