Hello,

I have column in database named as recente_visited, and it has type as timestamps. basically i am checking the user recent most time for a perticular page on my website.

so my recent visited time is stored something like this

visitor _id recent_visited
4 2009-05-13 10:37:55

now i want to show on page that this visitor visited 2 min ago, 30 min ago something like that. and i have to show 5 visitors on that page with there time. how can i achive that?

i have logic in mind

$visit = NOW() -recent_visited

but then again how can i apply it in my selection query?

Code:
"SELECT  a.username,a.avatar,r.visitor_id,r.visiting_count,r.recent_visited FROM recent_visitor as r ,author as a WHERE (r.visitor_id = a.id) AND r.profile_owner = '$uid' ORDER BY r.recent_visited DESC  LIMIT $start, $limit_value"
can anyone help me?

thanks in advance.