Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. function serverCmdcheckProfileOne(%username)
  2. {
  3. echo("----------------------------Check Profile 1 DB Connect----------------------------");
  4.  
  5.  
  6. Deleted this to protect my db info :)
  7.  
  8.  
  9.  
  10.  
  11. echo("------------Check Profile 1 DB Connected--------------");
  12.  
  13. %mysql.Query ("SELECT * FROM profile1 WHERE characterid=\"" @ %username @ "\"");
  14. %result= %mysql.StoreResult();
  15. echo("Query Result = ", %result);
  16.  
  17. echo("Ran Query");
  18. for (%i= 0; %i< %mysql.NumRows (%result); %i++)
  19. {
  20. echo("Running for statment");
  21. %mysql.FetchRow (%result);
  22.  
  23. %characterid = %mysql.GetRowCell (%result, "characterid");
  24. %CharacterName = %mysql.GetRowCell (%result, "CharacterName");
  25. echo ("Character ID = ", %characterid);
  26. echo ("Character Name = ", %CharacterName);
  27. echo("End of GetRow ");
  28. echo("if statment next ");
  29.  
  30. if (%CharacterName == "")
  31. {
  32. echo("Character Name = ", %CharacterName);
  33. echo("Character ID = ", %characterid);
  34. echo("String is = to 0");
  35. commandToClient(%client, 'CreateProfile1');
  36.  
  37. }
  38. else
  39. {
  40. echo(" String is not = to 0");
  41. commandToClient(%client, 'loadProfile1', %characterid, %CharacterName);
  42.  
  43. }
  44.  
  45. echo("Skipped If Statment in Check Profile One.");
  46. }
  47. echo("Closed Database");
  48. %mysql.FreeResult(%result);
  49. %mysql.Close();
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement