I am creating a video status app in which I have kept the option of trending video.So I want to have as many videos as there are in the video table of my Sql Database.Out of that, the video which has the most views is 50 videos show in my trending option.
And your question is?
It looks like an announcement
I think the question is how to created a ascending & descending video list by rank !!!
I unlist this until we have a clear question.
@pnkjpjt123 your question is not clear. Please clarify that
My question is how do I filter trending videos from all videos and show them in a list.
Get the most viewed/liked/shared videos from the list
Run query for descending
SELECT * FROM table_name ORDER BY column_name_to_sort DESC
Run query for ascending
SELECT * FROM table_name ORDER BY column_name_to_sort ASC
@pnkjpjt123 you better change the topic name
Suppose trending_videos is column name containing value of views so it contains any number the greater number the more trending video.
You need to create a trrnding_videos column in table or already have views column then put this column in this query you get high to low values
You can also limit the trending videos to 20 or 50 most viewed by add
LIMIT 20 in you query after
ASC OR DESC
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.