How does MySQL accurately match (sort) out the most recommendable information?

Source: Internet
Author: User
If the data table (info) has the following fields:

ID subject Message Dateline replies views Istop
Topic information time to reply to the number of clicks is recommended

How do I choose the most interesting/recommended information in 15 days (half a month)?

The general wording is:

SELECT id,subject,message,dateline,replies,views,istop from ' info ' WHERE istop = 1 ORDER by replies Desc,views Desc,dateli NE DESC LIMIT 10;

The information selected above will have a serious bug error, that is,

The larger the replies and views will be in front, the more the front row, replies and views will be larger, so this is a direct proportion, while such operations will have an unfair impact on other information.

Now, ask an order by formula not because the larger the replies and views, the more forward the algorithm,

At the moment I can think of: Log logarithm function, the logarithm is not because replies and views the larger and larger.

Reply content:

If the data table (info) has the following fields:

ID subject Message Dateline replies views Istop
Topic information time to reply to the number of clicks is recommended

How do I choose the most interesting/recommended information in 15 days (half a month)?

The general wording is:

SELECT id,subject,message,dateline,replies,views,istop from ' info ' WHERE istop = 1 ORDER by replies Desc,views Desc,dateli NE DESC LIMIT 10;

The information selected above will have a serious bug error, that is,

The larger the replies and views will be in front, the more the front row, replies and views will be larger, so this is a direct proportion, while such operations will have an unfair impact on other information.

Now, ask an order by formula not because the larger the replies and views, the more forward the algorithm,

At the moment I can think of: Log logarithm function, the logarithm is not because replies and views the larger and larger.

How do I choose the most interesting/recommended information in 15 days (half a month)? In fact, this has more practice. A Time field, for example, can also be similar to this comparison. But I would like to recommend that one of my methods is to build a field. Add yourself an algorithm to draw a number straight and then order BY field DESC limit 15. This way. I think it's more efficient.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.