mysql php rank rows

shaymiller

Regular Member
Joined
Dec 3, 2016
Messages
456
Reaction score
45
I have mysql database with 1000 rows. row number 1, has id # 1 and last row with id # 1000. In the same table, I have column called views. I want row number 1 to have view column update by the last row in the field. Then number 2, to have view column update the second last row id # etc

how can I do this in php sql query?

the background info is that I have songs table, the rows are insert first are the top songs. so I want to list those song as top songs.
 
Back
Top