Reputation: 447
I'm making a website with my movies and am trying to make the pagination by last id, date, views, and rating.
I can easily make the pagination by last id just by querying the database
SELECT *
FROM movies
ORDER BY movie_id DESC
then, with php make the pagination.
Now, my question is how to make it list by the other options? i can make it work with xml files but would like to know if there is a way to do this with a simple query.
my movie looks like this:
movie_id movie_title movie_subtitle movie_desc movie_data movie_views movie_rating
Thanks in advance.
Upvotes: 0
Views: 60
Reputation: 682
simple query will be the best and easy solution write a query with required where clause and then just appy the limit and offset values.
Upvotes: 1