Jump to content

[SOLVED] How to get specific stats.


pureDesi

Recommended Posts

I'm new to MySQL and couldn't figure this out for the life of me, I'm trying to pull out stats for a game from another table with a restriction, see below.

SELECT gameID, gameTitle, gameUnique, COUNT(mapID)
FROM games, maps
WHERE gameEnabled=1 AND mapParentID = gameID
ORDER BY gamePriority DESC, gameTitle ASC

It's intention is to pull all the games out (if it's enabled) and count how many maps are in each game from a separate table, "maps".

I'm completely lost as to how I would use GROUP BY. Any help would be appreciated

Thanks for your time

-pure

Link to comment
https://forums.phpfreaks.com/topic/49001-solved-how-to-get-specific-stats/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.