Jump to content

Recommended Posts

Hi, I am working on a query for a highscores feature, that shows the amount of "kills" a certain player has made.

 

Here is an example of the main table format:

rsca2_players, which has the columns .user, .pass, .join_time, etc

 

It stores their kills in a table called

rsca2_kills, which has a common column .user, the person they killed: .killed, the .time it happened, etc.

 

So naturally, if a user gets a lot of kills, they have a lot of rows in the rsca2_kills table.

 

What I am trying to do is make it so I get a query that returns who has the most kills, (their .user id), and the COUNT of the kill rows. Is there any way to do this? I made a query but it never finishes loading, I'm assuming it is not efficient? Is there something else that can be done to make this work?

Link to comment
https://forums.phpfreaks.com/topic/230673-how-to-best-approach-this-subquery/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.