Ted Garrad
New member
...in php/mysql? Hi,
I would like to track how many people vote for something per day, I am storing each vote individually (to monitor IP address, etc), in datetime format in MySQL.
My problem is I want to pull out number of votes that happened each day for the last 30 days, I have no idea how I can do that.
Am i storing the date/time in the most appropriate format? Would it be better as UNIX timestamp? How can I pull out the number of votes for any given day? And then the day before that (crossing calendar months etc)
Could someone please help with the direction - any links to tutorials etc or examples would be great thanks / what I would need to know
Thanks Seco, that would be great with the cutoff - but how to show number of votes _per day_ for 30 days?
I would like to track how many people vote for something per day, I am storing each vote individually (to monitor IP address, etc), in datetime format in MySQL.
My problem is I want to pull out number of votes that happened each day for the last 30 days, I have no idea how I can do that.
Am i storing the date/time in the most appropriate format? Would it be better as UNIX timestamp? How can I pull out the number of votes for any given day? And then the day before that (crossing calendar months etc)
Could someone please help with the direction - any links to tutorials etc or examples would be great thanks / what I would need to know
Thanks Seco, that would be great with the cutoff - but how to show number of votes _per day_ for 30 days?