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.