오늘 작성한 게시글 날짜 출력 하고 싶습니다. 정보
오늘 작성한 게시글 날짜 출력 하고 싶습니다.본문
아래 소스에 $subj 뒷 부분에 게시글 작성 날짜를 불러 오고 싶픈데 어찌 할찌 모르겠네요 ㅠㅠ
고수님들 답변좀 부탁 드릴께요~
<?
if ($member[mb_id])
{
$new_count = 2;
$cnt = 0;
$sql = " select bo_table, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
-- and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc
limit $new_count ";
$res = sql_query($sql);
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$sql = " select bo_subject from $g4[board_table] where bo_table = '$row[bo_table]'";
$board_name = sql_fetch($sql);
$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);
$subj = cut_str(get_text($row2[wr_subject]), 28, "");
$comment = "";
if ($row2[wr_comment])
$comment = "$row2[wr_comment]";
echo "<tr><td width='100'><a href='$g4[bbs_path/board.php?bo_table=$row[bo_table]'><font color=gray><?=$board_name[bo_subject]?> </font></a></td>";
echo "<td><a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>$subj</a> <font color=red size=1> + $comment</font>";
echo "</td></tr>";
$cnt++; } if (!$cnt) echo "<tr><td>게시물이 없습니다 ^_^;;</td></tr>";
} ?>
고수님들 답변좀 부탁 드릴께요~
<?
if ($member[mb_id])
{
$new_count = 2;
$cnt = 0;
$sql = " select bo_table, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
-- and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc
limit $new_count ";
$res = sql_query($sql);
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$sql = " select bo_subject from $g4[board_table] where bo_table = '$row[bo_table]'";
$board_name = sql_fetch($sql);
$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);
$subj = cut_str(get_text($row2[wr_subject]), 28, "");
$comment = "";
if ($row2[wr_comment])
$comment = "$row2[wr_comment]";
echo "<tr><td width='100'><a href='$g4[bbs_path/board.php?bo_table=$row[bo_table]'><font color=gray><?=$board_name[bo_subject]?> </font></a></td>";
echo "<td><a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'>$subj</a> <font color=red size=1> + $comment</font>";
echo "</td></tr>";
$cnt++; } if (!$cnt) echo "<tr><td>게시물이 없습니다 ^_^;;</td></tr>";
} ?>
댓글 전체
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
======================================================================================
$sql2 = " select wr_subject, wr_comment ,wr_datetime from $tmp_table where wr_id = '$row[wr_parent]' ";
$subj = cut_str(get_text($row2[wr_subject]), 28, "");
===================================================
$subj = cut_str(get_text($row2[wr_subject]), 28, "") . $row2[wr_datetime] ;
======================================================================================
$sql2 = " select wr_subject, wr_comment ,wr_datetime from $tmp_table where wr_id = '$row[wr_parent]' ";
$subj = cut_str(get_text($row2[wr_subject]), 28, "");
===================================================
$subj = cut_str(get_text($row2[wr_subject]), 28, "") . $row2[wr_datetime] ;