Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: List all articles for a dynamic time period: limit 1 year?
johnstephens wrote #280050:
I’ll have the site’s managing editor look at it too, just in case I’m missing something, and I’ll report back if I get confused.
In case you disable DST (or don’t care about 1 hour glitches), the following query should run noticeably faster on large datasets:
SELECT ID FROM textpattern WHERE Status=4 AND Posted BETWEEN CAST('{?archive_year||-1}-12-31 21:00:00' AS DATETIME) AND CAST('{?archive_year}-12-31 20:59:59' AS DATETIME)
Offline