Jump to content

[SOLVED] Selecting overall top 5


uramagget

Recommended Posts

I want to make a top 5 for a little mods script I downloaded, but in order to be an overall part of the top 5, a mod has to be high in each:

 

# of Downloadeds

# of Installs Marked

# of Views

# of Comments

 

 

Though the Math and performing the SQL query is just complicated. I do not know if there is further information to provide, but if there is, please tell me.

Link to comment
Share on other sites

Question 1.) No.

 

Question 2.) You'll need to join the tables. Lets say you have a field called id in both, which the join can be performed on. Lets also say downloads and installs are in table1 and views and comments are in table2:

 

SELECT (table1.downloads+table1.installs+table2.views*0.5+table2.comments) as total, table1.id as id FROM table1,table2 WHERE table1.id=table2.id ORDER BY total DESC

Link to comment
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.