아래소스는 최신글이 나오게끔 예전 개발자가 작성한 소스인데
제목 앞에 카테고리 이름이 나오도록 하고 싶어서요...
어떤식으로 작성해줘야 할지 궁금해 고수님들께 여쭙니다.
<div style="left:0px; top:0px; position:relative; width:445px; height:207px; overflow:hidden">
<?
include("../conn.php");
?>
<?
$result = @mysql_query("select wr_id, wr_subject, DATE_FORMAT(wr_datetime, '%m-%d') as date from g4_write_interview where wr_subject <> '' order by wr_id desc limit $page 7", $Connection);
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="../images/index/interview_title2.jpg" /> <img src="../images/index/interview_text.gif" /> <a href="../government/process_05.html?intType=0&intPath=351" target="_parent"><img src="../images/index/interview_more.gif" /></a></td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<?
while ($total = @mysql_fetch_array($result)) {
?>
<tr>
<td width="100%" height="25" align="left"><img src="../images/government/notice_dot.gif" align="absmiddle" /> <a href='../government/process_05.html?intType=0&intPath=351&bo_table=interview&wr_id=<?=$total[wr_id]?>' target="_parent">
<?
if(strlen($total[wr_subject]) > 48){
echo mb_substr($total[wr_subject], 0, 47, "euc-kr") . "…";
}else{
echo $total[wr_subject];
}
?></a></td>
</tr>
<?}?>
</table>
</td>
</tr>
</table>
<?
mysql_close($Connection);
?>
</div>
제목 앞에 카테고리 이름이 나오도록 하고 싶어서요...
어떤식으로 작성해줘야 할지 궁금해 고수님들께 여쭙니다.
<div style="left:0px; top:0px; position:relative; width:445px; height:207px; overflow:hidden">
<?
include("../conn.php");
?>
<?
$result = @mysql_query("select wr_id, wr_subject, DATE_FORMAT(wr_datetime, '%m-%d') as date from g4_write_interview where wr_subject <> '' order by wr_id desc limit $page 7", $Connection);
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="../images/index/interview_title2.jpg" /> <img src="../images/index/interview_text.gif" /> <a href="../government/process_05.html?intType=0&intPath=351" target="_parent"><img src="../images/index/interview_more.gif" /></a></td>
</tr>
<tr>
<td height="5"></td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<?
while ($total = @mysql_fetch_array($result)) {
?>
<tr>
<td width="100%" height="25" align="left"><img src="../images/government/notice_dot.gif" align="absmiddle" /> <a href='../government/process_05.html?intType=0&intPath=351&bo_table=interview&wr_id=<?=$total[wr_id]?>' target="_parent">
<?
if(strlen($total[wr_subject]) > 48){
echo mb_substr($total[wr_subject], 0, 47, "euc-kr") . "…";
}else{
echo $total[wr_subject];
}
?></a></td>
</tr>
<?}?>
</table>
</td>
</tr>
</table>
<?
mysql_close($Connection);
?>
</div>
댓글 6개
"select wr_id, wr_subject, DATE_FORMAT(wr_datetime, '%m-%d') as date
아 여기에서 wr_id,ca_name,
wr_id 뒤에 ca_name 을 추가해주세요.
<tr>
<td width="100%" height="25" align="left"><img src="../images/government/notice_dot.gif" align="absmiddle" /> <a href='../government/process_05.html?intType=0&intPath=351&bo_table=interview&wr_id=<?=$total[wr_id]?>' target="_parent">
여기뒤에 해보세요. 이렇게
<?=$total[ca_name]?>
아 여기에서 wr_id,ca_name,
wr_id 뒤에 ca_name 을 추가해주세요.
<tr>
<td width="100%" height="25" align="left"><img src="../images/government/notice_dot.gif" align="absmiddle" /> <a href='../government/process_05.html?intType=0&intPath=351&bo_table=interview&wr_id=<?=$total[wr_id]?>' target="_parent">
여기뒤에 해보세요. 이렇게
<?=$total[ca_name]?>
게시글 목록
| 번호 | 제목 |
|---|---|
| 284438 | |
| 284437 | |
| 284435 | |
| 284430 | |
| 284420 | |
| 284417 | |
| 284409 | |
| 284401 | |
| 284399 | |
| 284397 | |
| 284380 | |
| 284378 | |
| 284371 | |
| 284370 | |
| 284366 | |
| 284364 | |
| 284360 | |
| 284357 | |
| 284355 | |
| 284354 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기