Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2014-04-04 22:08:50

etc
Developer
Registered: 2010-11-11
Posts: 5,689
Website GitHub

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

Board footer

Powered by FluxBB