I've got the following order by, ORDER BY `date_updated` DESC, `times_downloaded` DESC
I know what I need to do, but not sure how to do it.
I need to do something like ORDER BY IF...
the field date_updated is a timestamp, I need to do order by if ($date_updated !== $date_added AND ($time - $date_updated) <= 604800), `times_downloaded` DESC
So it'll order by times_downloaded descending, but will show updated items at the top of the list regardless of times downloaded if they were updated more recently than 7 days.
I hope I've clearly enough...