Welcome Guest, Not a member yet? Register   Sign In
Posted X ago
#5

[eluser]richthegeek[/eluser]
You need to wrap your sums...
Code:
$minutes = round( ( $images->time - time() ) / 3600 );

This would be best used in the form of a model, so that your images model would retrieve the data from the database and work out the number of minutes, hours, seconds, days, etc ago - either automagically or via a direct function call.


Messages In This Thread
Posted X ago - by El Forum - 07-05-2008, 03:16 PM
Posted X ago - by El Forum - 07-05-2008, 04:02 PM
Posted X ago - by El Forum - 07-05-2008, 06:40 PM
Posted X ago - by El Forum - 07-05-2008, 07:15 PM
Posted X ago - by El Forum - 07-05-2008, 07:23 PM
Posted X ago - by El Forum - 07-05-2008, 08:18 PM
Posted X ago - by El Forum - 07-06-2008, 01:05 AM
Posted X ago - by El Forum - 07-06-2008, 08:11 AM
Posted X ago - by El Forum - 07-06-2008, 08:50 PM
Posted X ago - by El Forum - 07-07-2008, 02:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB