51cent Опубликовано 6 Апреля 2006 Жалоба Поделиться Опубликовано 6 Апреля 2006 Народ, нужна помошь, я создаю щас мод статистики форума (х последних тем, постов, измен репутации и т.д.) но возникла проблемма с выводом ника изменяющего репутацию $this->ipsclass->DB->simple_construct( array( 'select' => 'from_user, to_user, forum, topic, post, created, message, rating, anonym ', 'from' => 'reputation', 'order' => 'created DESC', 'limit' => $limit ) ); $this->ipsclass->DB->simple_exec(); while ( $row = $this->ipsclass->DB->fetch_row() ) { $html3 .= $this->tmpl_format_rep($row, 30); }Выбираю х последних изменений репы и отправляю на вывод в таблицу function tmpl_format_rep($entry, $cut) { $entry['message'] = strip_tags($entry['message']); $entry['message'] = str_replace( "!" , "!" , $entry['message'] ); $entry['message'] = str_replace( """, "\"", $entry['message'] ); if (strlen($entry['message']) > $cut) { $entry['message'] = substr( $entry['title'],0,($cut - 3) ) . "..."; $entry['message'] = preg_replace( '/&(#(\d+;?)?)?(\.\.\.)?$/', '...',$entry['message'] ); } $rating = $entry['rating']; if ($rating == "1") { $img = "<img src='".$baseurl."style_images/1/up.gif' border='0'>"; } else { $img = "<img src='".$baseurl."style_images/1/down.gif' border='0'>"; } $this->ipsclass->DB->simple_construct( array( 'select' => 'id, name', 'from' => 'members', 'where' => 'id='.$entry['from_user'] ) ); $this->ipsclass->DB->simple_exec(); while ( $row = $this->ipsclass->DB->fetch_row() ) { $member = $row['name']; $id = $row['id']; } $this->ipsclass->vars['csite_article_date'] = $this->ipsclass->vars['csite_article_date'] ? $this->ipsclass->vars['csite_article_date'] : 'j-m-y H:i'; $entry['date'] = gmdate( $this->ipsclass->vars['csite_article_date'], $entry['created'] + $this->ipsclass->get_time_offset() ); return $this->ipsclass->compiled_templates['skin_statistica']->tmpl_reput_row($entry['message'], $member, $img, $entry['date'], $id); }А здесь если я начну проверять ид пользователя из первого запроса и подставлять во 2-ой то цикл завершится на проверки 1-го ид Вопрос такой, как мне проверить ид из таблици репутации и мемберс и получить отсюда имя этого ид пользователя Цитата Ссылка на комментарий Поделиться на других сайтах Прочее
Рекомендуемые сообщения
Присоединиться к обсуждению
Вы можете ответить сейчас, а зарегистрироваться позже. Если у вас уже есть аккаунт, войдите, чтобы ответить от своего имени.