I want to capture some data from a WP website I'm building. The website will show a game to play for each calendar month (12 games). Players can come and play at any month of their choosing. If they choose to play the game for a certain month, I want to know what game they played, who played the game and in which month. Is there a way to query WP db to find these details? Can this detail sit in a different DB to the standard WP DB?
I want to capture some data from a WP website I'm building. The website will show a game to play for each calendar month (12 games). Players can come and play at any month of their choosing. If they choose to play the game for a certain month, I want to know what game they played, who played the game and in which month. Is there a way to query WP db to find these details? Can this detail sit in a different DB to the standard WP DB?
Share Improve this question asked Jul 31, 2023 at 3:19 SamSam 111 bronze badge 1- You have to store data regarding who played what game in which month. I'd add this to user_meta or generate a custom DB table for WordPress to store a relationship and, for the sake of the report, index the month/year data so you can retrieve reports. Depending on volume of users I earnestly think the custom DB table could be the better option. It's a bit more work but the end result is that it'll only ever have to do any heavy lifting when you're generating reports. This allows the rest of the WP site to function optimally. – Tony Djukic Commented Jul 31, 2023 at 22:18
1 Answer
Reset to default 0Without really knowing everything about how you've set up your site, I can only offer a generic answer to your questions.
If you have set up a way to save information to the database about who played which game and when, then you should be able to query those information.
You can save data to a different db other than your "standard WP DB", or you can save those information to a custom table or tables in your "standard WP DB".