Quote:
Originally Posted by WAR
I would like it to only display one digest at a time, updated daily, which includes all news posts from the last X number of days (instead of one digest a day displaying just items from that day) is that easily possible?
|
Not until I rework the code. What I need to do to figure out how to load all the posts in the specified timespan into a single array that the code can then manipulate. The flowchart would be
1. Get the range of days (possibly using $_REQUEST or $_POST so that users can look stuff up).
2. Use strtotime() to convert the range to Unix timestamps.
3. Run the query, putting the posts into an array sorted by time.
4. Divide the array up by days within the range.
5. Further divide by categories
6. Assemble it.
Doing it this way would save a LOT of queries.