Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
-
knippysing
- Forum Newbie
- Posts: 1
- Joined: Fri Mar 17, 2006 11:00 am
Post
by knippysing »
I have a table with a timestamp in each line and I would like to display on a web page the count of how many posts are made per day.
ID post_time post_text
Not sure what kind of coding I need to make this happen. If there is a nice and easy way to format it so that it can do it.
If anyone has any ideas, please let me know!!!
Thanks
-
timvw
- DevNet Master
- Posts: 4897
- Joined: Mon Jan 19, 2004 11:11 pm
- Location: Leuven, Belgium
Post
by timvw »
If you GROUP your rows BY year-month-day and then SELECT SUM of those sets you'd have what you want.
(Ok, now you need to look in the MySQL manual, Date and Time functions section, to see how to do that)