Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP和MySQL排名_Php_Mysql_Ranking - Fatal编程技术网

PHP和MySQL排名

PHP和MySQL排名,php,mysql,ranking,Php,Mysql,Ranking,我在MySQL中有这个表: id | name | points 1 | John | 9 2 | Bart | 7 3 | Billy | 14 我希望有一个HTML/PHP表格,他在其中打印以下内容: Name Points Billy 14 John 9 Bart 7 我该怎么办?尝试以下查询: SELECT name, points FROM your_table ORDER BY points DESC 堆栈溢出不是一种编码服务,您至少必须尝试一些东西并

我在MySQL中有这个表:

id | name  | points
1  | John  | 9
2  | Bart  | 7
3  | Billy | 14
我希望有一个HTML/PHP表格,他在其中打印以下内容:

Name   Points
Billy  14
John   9
Bart   7
我该怎么办?

尝试以下查询:

SELECT name, points FROM your_table ORDER BY points DESC

堆栈溢出不是一种编码服务,您至少必须尝试一些东西并向我们展示。