[최신글 카테고리] 출력문제 부탁드려요 정보
[최신글 카테고리] 출력문제 부탁드려요본문
아래소스는 최신글이 나오게끔 예전 개발자가 작성한 소스인데
제목 앞에 카테고리 이름이 나오도록 하고 싶어서요...
어떤식으로 작성해줘야 할지 궁금해 고수님들께 여쭙니다.
<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>
( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '282882' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )
1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
error file : /15sir/bbs/board.php