Reputation: 77
I'm building an web app with PHP where users upload images and they're displayed publicly on a main index.php file. My problem is premium members get features, one of which allows you to upload a larger picture and keep them at the top so they can be above all others for a longer period of time.
Any idea how to do this so that a MySQL field can easily control this.
Thanks
Upvotes: 0
Views: 521
Reputation: 1146
Create an expiration_date
column and insert a further out date into this column for the pictures when a premium user uploads an image and then ORDER BY expiration_date DESC
will keep the soonest to expire on the bottom.
Upvotes: 3