thetwistedpanda

Untitled

Sep 15th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.48 KB | None | 0 0
  1. public Action:CreateItemsTables(Handle:Timer)
  2. {
  3.     new String:sQuery[128 * 32];
  4.     Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS `Items`");
  5.     Format(sQuery, sizeof(sQuery), "%s (`PlayerID` VARCHAR(24) PRIMARY KEY,")//Assuming this is your AuthString
  6.     new iCap = MAXITEMS - 1;
  7.     for(new i = 1; i < MAXITEMS; i++)
  8.         Format(sQuery, sizeof(sQuery), "%s `Column_%d` int(12) NULL%s", sQuery, i, ((i == iCap) ? ")", ",");
  9.     SQL_TQuery(hDatabase, SQLErrorCheckCallback, sQuery);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment