How to find average of seconds in php -


I'm displaying some photos in the iPhone app. If users view information about the image, then I will send the user my SQL table. How can now get the average of seconds for each picture.

You do not need to do this in PHP to work on the database using the overall work You can get:

  as AVG_seconds_viewed yourtable WHERE id = 123     as SELECT AVG (seconds_viewed)

Comments