Advertisement
Rochet2

Untitled

Feb 10th, 2018
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. bool ChatHandler::HandleEpcSupportShowCommand(const char* /*args*/)
  2. {
  3.     QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT id, player_guid, name, message, status FROM support_ticket WHERE status = 0");
  4.     if (!result)
  5.     {
  6.         PSendSysMessage("No rows with status 0");
  7.         return true;
  8.     }
  9.  
  10.     do
  11.     {
  12.         Field* result = result->Fetch();
  13.         uint32 id = result[0].GetUInt32();
  14.         uint32 player_guid = result[1].GetUInt32();
  15.         std::string name = result[2].GetString();
  16.         std::string message = result[3].GetString();
  17.         uint8 status = result[4].GetUInt8();
  18.         PSendSysMessage("ID: %u Guid: %u Name: %s\n", id, player_guid, name.c_str());
  19.     } while (result_2->NextRow());
  20.     return true;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement