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

.
NvL

Помогите переделать код от групп, чтоб выводил список групп за определенным юзером(т.е. группы который добавил юзер)
Вот код который выводит наоборот список юзеров за определенной групой, думаю его можно переделать
<?php
define('_IN_JOHNCMS', 1);
$textl = ' мои груп';
$rootpath = '../../';
require_once ("../../incfiles/core.php");
require_once ("../../incfiles/head.php");
header("Content-type:text/html; charset=utf-8");
//////////////

$req = mysql_query("SELECT * FROM `groups_users` LEFT JOIN `users` ON `groups_users`.`uid`=`users`.`id` WHERE `groups_users`.`ref` = '".$id."' ORDER BY `groups_users`.`time` ASC LIMIT $start, $kmess");
while ($res = mysql_fetch_assoc($req))
{
echo ($i % 2) ? '<div class="list2">' : '<div class="list1">';
echo show_user($res, 1, NULL);
if($row['uid']==$user_id)echo ''.($res['id']!=$user_id ? '<div class="sub"><a href="mpanel/?do=use&amp;id='.$id.'&amp;uid='.$res['id'].'">Удалить</a></div>':'').'';
echo '</div>';
++$i;
}


require_once ("../../incfiles/end.php");

?>