如何使用PHP显示最受欢迎的文章 [英] How to display most popular articles using PHP

查看:93
本文介绍了如何使用PHP显示最受欢迎的文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi,
how to display most popular articles using php 
and thanks in advance  





我尝试过:



从views =?的文章中选择*?



What I have tried:

select * from articles where views=?

推荐答案

了解如何使用ORDER BY子句,将它们排序到最少。

然后获得最受欢迎的n



你错误地认为,观点= =普及。
Look into how to use the ORDER BY clause, sorting them most to least.
Then get the n most popular

You're assuming, wrongfully, that views == popularity.


这篇关于如何使用PHP显示最受欢迎的文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆