Просмотр поста

.
Dead

Jove, Вот рабочий 100℅
<?php
$req_lib = mysql_query("SELECT * FROM `lib` WHERE `type`='bk' ORDER BY `time` DESC LIMIT 5 ");
for ($i = 0; $res_lib = mysql_fetch_assoc($req_lib); ++$i) {
echo '<div class="inf">';
echo '<a href="' . $set['homeurl'] . '/library/index.php?id='.$res_lib['id'].'">'.$res_lib['name'].'</a>';
$komm_lib = mysql_num_rows(mysql_query("select `id` from `lib` where type = 'komm' and refid = '" . $res_lib['id'] . "'"));
echo '<div class="dopinfo"><i class="fi-comments"></i> Комментарии &nbsp;'.$komm_lib.'&nbsp;&nbsp;&nbsp;';
echo '<i class="fi-page-eyes"></i> Просмотров:&nbsp; '.$res_lib['count'].'</div>';
echo '</div>';
}
?>