Have an account? Sign in
Login  Register  Facebook
how i can group a table to make charts
i want to make charts system and i think it must be grouping like this
1 jan 2009  = 10 post
2 jan 2009  = 2 post
4 jan 2009  = 10 post
6 jan 2009  = 60 post
and i have posts table that has id,user_id,date how i can select from posts to show it like that
and the date type is UNIXTIME
Started: September 18, 2011 Latest Activity: September 18, 2011 php mysql charts
1 Answer
Try ..
SELECT FROM_UNIXTIME(`date`, '%e %M %Y') as `post_date`, COUNT(*)
FROM your_table
GROUP BY `post_date`
More information to reference:

Posted: MacOS
In: September 18, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer