PHP Split array values based on time -


i want human readable words php code:

take values column "ratings" time >= 24 hours split them 1 hour each take average rating values each hour , put them 24 variables

whati'm doing bad long code :/

i'm taking them hour after another, each 1 in separate function specify hour via mysql select statement!

i'm new in programming, , couldn't figure out values @ once, , split them 1 hour each

thanks

edit: changed fiddle, uses time int, represents seconds since january 1st, 1970.

take @ fiddle: http://sqlfiddle.com/#!2/6e6b6/5/0 returning rating average on hourly basis. need? think might tune query other needs.

you can read more @ http://dev.mysql.com/doc/refman/5.6/en/date-and-time-functions.html


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -