Argh stom. Ik moet weten of er vorige maand en volgende maand, gerekend van hier, minstens één entry is het weblog is. 

Wat zit ik te doen? Idiotieën in de zin van

SELECT TOP 1 item_creation FROM tblItems WHERE item_creation BETWEEN #createdatetime(year(dateadd(“m”,-1,thisdate)),month(dateadd(“m”,-1,thisdate)),1,0,0,0)# AND #createdatetime(year(dateadd(“m”,-1,thisdate)),month(dateadd(“m”,-1,thisdate)),daysinmonth(dateadd(“m”,-1,thisdate)),23,59,59)# ORDER BY item_creation DESC

…in plaats van fucking gewoon

SELECT TOP 1 item_creation FROM tblItems WHERE month(item_creation)=#month(dateadd(“m”,-1,thisdate))# AND year(item_creation)=#year(dateadd(“m”,-1,thisdate))# ORDER BY item_creation DESC

Bah.