Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Action:CreateItemsTables(Handle:Timer)
- {
- new String:sQuery[128 * 32];
- Format(sQuery, sizeof(sQuery), "CREATE TABLE IF NOT EXISTS `Items`");
- Format(sQuery, sizeof(sQuery), "%s (`PlayerID` VARCHAR(24) PRIMARY KEY,"); //Assuming this is your AuthString
- new iCap = MAXITEMS - 1;
- for(new i = 1; i < MAXITEMS; i++)
- Format(sQuery, sizeof(sQuery), "%s `Column_%d` int(12) NULL%s", sQuery, i, ((i == iCap) ? ")", ",");
- SQL_TQuery(hDatabase, SQLErrorCheckCallback, sQuery);
- }
Advertisement
Add Comment
Please, Sign In to add comment