헐랭이님의 나의 최신글에.. 날짜와 글쓴이를 표현하려면?? 정보
헐랭이님의 나의 최신글에.. 날짜와 글쓴이를 표현하려면??본문
그누로 사이트를 제작중에.. 계속 난관이네요..
그누 고수님들의 지도를 부탁드립니다.
헐랭이님의 나의 최신글을 고치고 있는데...
이 소스에서 제목은 지금 잘 나옵니다..
그런데 날짜와 글쓴이를 출력해줘야 하는데..
<td width="100" align="center"><?=$list[$i][datetime2]?></td>
<td width="200" align="center"><?=$list[$i][wr_5]?>~<?=$list[$i][wr_6]?></td>
<td width="130" align="center"><?=$list[$i][wr_name]?></td>
<td width="4"></td>
<td width="200" align="center"><?=$list[$i][wr_5]?>~<?=$list[$i][wr_6]?></td>
<td width="130" align="center"><?=$list[$i][wr_name]?></td>
<td width="4"></td>
echo안에 위의 소스를 붙였는데...
도통 나타나질 않네요;;;
방법을 좀 알려주시기 바랍니다.
부탁드립니다.(__)
댓글 전체
원하는 필드값을 출력 시키기 위해선 아래의 코드 부분을 수정해야 합니다.
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$subj = cut_str($subj, $subjc);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<tr height=23><td class=bg_menu2 title='$subj'>";
echo "<nobr style='display:block;overflow:hidden;width:160px;'>";
echo "<img src='$new_my_skin_path/img/list_icon2.gif'> <a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>";
echo "<span style='color:#666666;'>$comment $subj</span></a>";
echo "</nobr></td></tr>";
}
위의 코드부분을 수정하는 방법을 알려 드리므로 참조 바랍니다.
1,
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' "; <- 이라인에서 출력코자 하는 필드명을 아래처럼 추가 하거나
$sql2 = " select 필드1, 필드2, 필드3, wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
또는 전체 필드값을 가져오도록 수정합니다.아래처럼 (이경우 부하가 조금 발생합니다.)
$sql2 = " select * from $tmp_table where wr_id = '$row[wr_parent]' ";
2,
위처럼 수정한후 출력코자 하는 필드값을 불러 냅니다.
$list[$i][출력할 필드명]
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$subj = cut_str($subj, $subjc);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<tr height=23><td class=bg_menu2 title='$subj'>";
echo "<nobr style='display:block;overflow:hidden;width:160px;'>";
echo "<img src='$new_my_skin_path/img/list_icon2.gif'> <a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>";
echo "<span style='color:#666666;'>$comment $subj</span></a>";
echo "</nobr></td></tr>";
}
위의 코드부분을 수정하는 방법을 알려 드리므로 참조 바랍니다.
1,
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' "; <- 이라인에서 출력코자 하는 필드명을 아래처럼 추가 하거나
$sql2 = " select 필드1, 필드2, 필드3, wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
또는 전체 필드값을 가져오도록 수정합니다.아래처럼 (이경우 부하가 조금 발생합니다.)
$sql2 = " select * from $tmp_table where wr_id = '$row[wr_parent]' ";
2,
위처럼 수정한후 출력코자 하는 필드값을 불러 냅니다.
$list[$i][출력할 필드명]
헐랭이님 감사드립니다.
알려주신대로 하니까 잘됩니다. 정말 감사드립니다. ^^
(__)
알려주신대로 하니까 잘됩니다. 정말 감사드립니다. ^^
(__)