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
Post a Comment