MYSQL: How do I detect all tables existing data?
#1

Hello everyone.
I am trying to load different objects a player can create in game. When it happens, a new row in "player's objects" table saving the object id, coords offset, and so on will be created.

My problem is that I need to load all the saved objects when starting the gamemode, not everytime a player logs in, and so I do not have player's name to load data. This is that table I was talking about

PHP код:
        strcat(DB_Query, "CREATE TABLE IF NOT EXISTS `%e`", P[playerid][Name]);
        
strcat(DB_Query,"(`ID` int(11) NOT NULL AUTO_INCREMENT,");
        
strcat(DB_Query,"`USERNAME` varchar(24) NOT NULL,");
        
strcat(DB_Query,"`POSX` float(12),");
        
strcat(DB_Query,"`POSY` float(12),");
        
strcat(DB_Query,"`POSZ` float(12),");
        
strcat(DB_Query,"`ROTX` float(12),");
        
strcat(DB_Query,"`ROTY` float(12),");
        
strcat(DB_Query,"`ROTZ` float(12),");
        
strcat(DB_Query,"`OBJECTID` mediumint(7) NOT NULL,");
        
strcat(DB_Query,"PRIMARY KEY (`ID`),UNIQUE KEY `USERNAME` (`USERNAME`))"); 
Reply


Messages In This Thread
MYSQL: How do I detect all tables existing data? - by v1k1nG - 03.10.2018, 11:18
Re: MYSQL: How do I detect all tables existing data? - by Calisthenics - 03.10.2018, 13:34
Re: MYSQL: How do I detect all tables existing data? - by v1k1nG - 03.10.2018, 13:48

Forum Jump:


Users browsing this thread: 1 Guest(s)