<?php
$azaza=mysql_result(mysql_query("SELECT COUNT(*) FROM `group`"
,0);
if ($azaza==0){echo '<div class="white">Группы отсутствуют!</div>';}
$group=mysql_query("SELECT * FROM `group` ORDER BY `users` DESC LIMIT 7"
;
while ($data = mysql_fetch_assoc($group)){
$neww=mysql_result(mysql_query("select count(*) from `group_lenta`, `group_users` where `group_users`.`user`='".$user['id']."' and `group_lenta`.`group`=`group_users`.`group`and `group_lenta`.`group`='".$data['id']."' and `group_users`.`time`<`group_lenta`.`time`;"
,0);
echo '<table cellspacing="0" cellpadding="0" width="100%" ><tr>
<td class="lines" width="10%"><div class="pagebg48">азаза</div></td>
<td class="lines" width="90%"><a href="'.$data['id'].'">'.$data['title'].'</a> '.($neww > 0 ? $neww:NULL).'<br/>
<span style="font-size:12px;color:#757575;">'.$data['users'].' участников</span> <br/>
</td></tr></table>';
}
?>