PDA

View Full Version : Post count query between two dates


mathforum
03-12-2014, 08:09 PM
How can I find how many posts a user has made between two dates?

kh99
03-22-2014, 09:21 PM
Sorry for the late reply, but if you're still looking for this, I think you can do something like:

SELECT COUNT(*) FROM post
WHERE userid = X AND visible = 1 AND
dateline >= UNIX_TIMESTAMP('2013-01-01 00:00:00') AND
dateline <= UNIX_TIMESTAMP('2013-06-01 23:59:59')

where of course you'd change X to the userid you want, and change the dates as needed.