Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Score Sheet using PHP/MySQL

I wanted to build a webpage which displays the score of particular people.
It would have 3 columns, namely, rank, name and points.
The rank column is an auto updating column.
I want the database the display the scores and the corresponding ranks in an ascending order way.
I will update the score manually into the database or by using SQL query 'update'. But then by refreshing the webpage the ranks should get sorted according to the points.

I've tried this

SELECT * FROM 'SCORE' ORDER BY 'POINTS' ASC;

Here, score is the table and points is the column of points.

like image 481
Ayush Khemka Avatar asked Dec 30 '25 09:12

Ayush Khemka


1 Answers

Don't use single quote around column names. Use backtick instead,

SELECT *
FROM `SCORE` 
ORDER BY `POINTS` ASC;
like image 115
John Woo Avatar answered Jan 01 '26 21:01

John Woo