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 '
|
|||