void Item::SaveRefundDataToDB() { SQLTransaction trans = CharacterDatabase.BeginTransaction(); trans->PAppend("DELETE FROM item_refund_instance WHERE item_guid = '%u'", GetGUIDLow()); trans->PAppend( "INSERT INTO item_refund_instance (`item_guid`, `player_guid`, `paidMoney`, `paidExtendedCost`)" " VALUES('%u', '%u', '%u', '%u')", GetGUIDLow(), GetRefundRecipient(), GetPaidMoney(), GetPaidExtendedCost()); CharacterDatabase.CommitTransaction(trans); }
void Item::SaveRefundDataToDB() { SQLTransaction trans = CharacterDatabase.BeginTransaction(); PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_REFUND_INSTANCE); stmt->setUInt32(0, GetGUIDLow()); trans->Append(stmt); stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_ITEM_REFUND_INSTANCE); stmt->setUInt32(0, GetGUIDLow()); stmt->setUInt32(1, GetRefundRecipient()); stmt->setUInt32(2, GetPaidMoney()); stmt->setUInt16(3, uint16(GetPaidExtendedCost())); trans->Append(stmt); CharacterDatabase.CommitTransaction(trans); }