Jump to content

Recommended Posts

I want to organize according to the number of entries, every row has a column value called threadid, which may repeat for different rows, so I wish to put the most frequent appearing threadid on the top, and least at the bottom, is this suppose to be done with GROUP? or something else?

Thank you

Ted

Link to comment
https://forums.phpfreaks.com/topic/37992-mysql-how-to-organize-by-the-no-of-rows/
Share on other sites

sorry, I didnt explain clearly enough, I wish to organize the rows by the frequency of the appearance, for example:

id threadid

1 2

2 3

3 1

4 2

5 4

 

so I want the order to look like:

2 (2 comes first because it occured the most frequent.)

3

1

4

the rest would automatically organize by id, since they have the same frequency.

Ted

Hope that makes it clear

 

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.