스킨오류 문의
본문
이스킨은 받아서 적용중에 에러가 났습니다
아무리 찾아봐도 해결이 안되서요
적용사이트
41번째줄
while($row = mysql_fetch_array($query)){
$datee=$row[wr_link1];
?>
<tr>
<td style="padding-left:3px;"><font style='font-family:돋움; font-size:8pt;'>[
<? // echo substr($datee,0,4)."년". ?>
<? echo sprintf("%02d",substr($datee,4,2))."월".sprintf("%2d",substr($datee,6,2))."일"; ?> ]</font></td>
<td><font style='font-family:돋움; font-size:8pt; color:#339933;'><b>
<a href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bo_table?>&wr_id=<?=$row[wr_id]?>" target="_parent"> <?=$row[wr_subject];?>
</a>
</b></font></td>
답변 2
while($row = mysql_fetch_array($query)){
이전에 $query의 값이 무엇인가요?
만약 mysql_query로 결과를 받지 않았다면 다음과 같은 오류가 발생하겠지요
$query = " select구문 또는 insert구문 또는 update구문 또는 delete구문등등 ";
$result = mysql_query($query);
whie또는 for ( $row = mysql_fetch_array($result)) ;
와 같은 순번이 되거나
$query = mysql_query(" select구문 또는 insert구문 또는 update구문 또는 delete구문등등 ");
whie또는 for ( $row = mysql_fetch_array($result)) ;
와 같은 형태가 되어야 합니다
확인해보세요
<?
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
$bo_table2 = 'g4_write_'.$bo_table;
// 이번달 첫날 구하기
$start = date("Ym").'00';
$end = date("Ym").'33';
$sql = "SELECT * FROM $bo_table2 where wr_link1 > $start and wr_link1 < $end order by wr_link1";
$query = mysql_query($sql);
// $row = mysql_fetch_array($query);
?>
<link href="/style.css" rel="stylesheet" type="text/css" />
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="calimg/cal_back.gif" style="background-repeat:repeat-y;">
<tr><Td colspan="4" align="center" style="padding-top:5px; padding-bottom:2px;">
<table width="95%" height="10" border="0" cellpadding="0" cellspacing="0" background="calimg/dote.gif">
<tr>
<td></td>
</tr>
</table>
</Td></tr>
<tr>
<td style="padding:0px 5px;"><table width="100%">
<Tr>
<td style="padding-left:56px; background-repeat:no-repeat; background-position:left;" colspan="4" background="calimg/cal_daycounter.gif" ><font size="+1">
<?
$sql2 = mysql_query("SELECT SQL_CALC_FOUND_ROWS * FROM $bo_table2 where wr_link1 > $start and wr_link1 < $end");
$result = mysql_query("SELECT FOUND_ROWS()");
$total = mysql_fetch_row($result);
echo $total[0];
?>
</font> </td>
</Tr>
</table></td>
</tr>
<tr>
<td valign="top"><table width="99%">
<?
while($row = mysql_fetch_array($query)){
$datee=$row[wr_link1];
?>
<tr>
<td style="padding-left:3px;"><font style='font-family:돋움; font-size:8pt;'>[
<? // echo substr($datee,0,4)."년". ?>
<? echo sprintf("%02d",substr($datee,4,2))."월".sprintf("%2d",substr($datee,6,2))."일"; ?> ]</font></td>
<td><font style='font-family:돋움; font-size:8pt; color:#339933;'><b>
<a href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$bo_table?>&wr_id=<?=$row[wr_id]?>" target="_parent"> <?=$row[wr_subject];?>
</a>
</b></font></td>
<td style="padding-right:3px;"><font style='font-family:돋움; font-size:8pt;'>~<? echo sprintf("%2d",substr($datee,6,2))."일";?></font></td>
</tr>
<tr><Td></Td></tr>
<? } ?>
</table></td>
</tr>
<tr>
<td colspan="4"><img src="calimg/cal_down.gif" /></td>
</tr>
</table>