Список пользователей добавивших записи в свои дневники



<?php
$sql
= "SELECT DISTINCT (n.uid), u.name FROM {node} n JOIN {users} u USING (uid) WHERE type = 'blog' ORDER BY n.changed DESC LIMIT 10";
$results = db_query($sql);
$items = array();
while (
$data = db_fetch_object($results) ) {
 
$items[] = l($data->name, "blog/$data->uid");
}
if (
count($items) ) {
  print
theme('item_list', $items);
}
?>

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.