30 самых просматриваемых фото за 24 часа

= UNIX_TIMESTAMP(NOW()) - 86400 GROUP BY photo_id ORDER BY view_count DESC LIMIT 30;'); $top = 0; foreach ($photos as $pd) { $photo = DB::query('SELECT * FROM photos WHERE id=:id', array(':id'=>$pd['photo_id'])); foreach ($photo as $p) { $top++; $author = new User($p['user_id']); echo '
'.$top.'

Новых просмотров:
+'.$pd['view_count'].'

347 КБ

'.htmlspecialchars($p['place']).'

'.htmlspecialchars($p['postbody']).'

'.Date::zmdate($p['timeupload']).'
Автор: '.htmlspecialchars($author->i('username')).'

'; } } ?>