echo 안에 if문이 안먹히는데... 정보
echo 안에 if문이 안먹히는데...본문
<?
for ($i=0; $row=sql_fetch_array($result); $i++) {
$s_mod = "<a href=\"./banner_form.php?$qstr&w=u&bn_id=$row[bn_id]\"><img src='img/icon_modify.gif' border=0 title='수정'></a>";
$s_del = "<a href=\"javascript:del('./banner_delete.php?$qstr&w=d&bn_id=$row[bn_id]');\"><img src='img/icon_delete.gif' border=0 title='삭제'></a>";
$list = $i%2;
$openchk = "";
if($row[bn_openchk] == "1")
$openchk = "checked";
echo "
<input type=hidden name=bn_id[$i] value='$row[bn_id]'>
<tr class='list$list col1 ht center'>
<td><nobr style='display:block; overflow:hidden;'>
if($row[bn_location] == x)
{
echo '123456789';
}
$row[bn_subject]</nobr></td>
<td><nobr style='display:block; overflow:hidden;'><center>$row[bn_start_date]</center></nobr></td>
<td><nobr style='display:block; overflow:hidden;'><center>$row[bn_end_date]</center></nobr></td>
</tr>";
}
if ($i == 0)
echo "<tr><td colspan='$colspan' align=center height=100 class=contentbg>해당되는 광고가 없습니다.</td></tr>";
echo "<tr><td colspan='$colspan' class='line2'></td></tr>";
echo "</table>";
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<table width=100% cellpadding=3 cellspacing=1>";
echo "<tr><td width=50%>";
echo "</td>";
echo "<td width=50% align=right>$pagelist</td></tr></table>\n";
if ($stx)
echo "<script language='javascript'>document.fsearch.sfl.value = '$sfl';</script>\n";
?>
-------------------------------------------------------------------------------------
위에서 아래 if문이 왜 안되는 건가요...?;; echo 부분 찾아서 해봤는데 잘 안되네요..;
if($row[bn_location] == x)
{
echo '123456789';
}
for ($i=0; $row=sql_fetch_array($result); $i++) {
$s_mod = "<a href=\"./banner_form.php?$qstr&w=u&bn_id=$row[bn_id]\"><img src='img/icon_modify.gif' border=0 title='수정'></a>";
$s_del = "<a href=\"javascript:del('./banner_delete.php?$qstr&w=d&bn_id=$row[bn_id]');\"><img src='img/icon_delete.gif' border=0 title='삭제'></a>";
$list = $i%2;
$openchk = "";
if($row[bn_openchk] == "1")
$openchk = "checked";
echo "
<input type=hidden name=bn_id[$i] value='$row[bn_id]'>
<tr class='list$list col1 ht center'>
<td><nobr style='display:block; overflow:hidden;'>
if($row[bn_location] == x)
{
echo '123456789';
}
$row[bn_subject]</nobr></td>
<td><nobr style='display:block; overflow:hidden;'><center>$row[bn_start_date]</center></nobr></td>
<td><nobr style='display:block; overflow:hidden;'><center>$row[bn_end_date]</center></nobr></td>
</tr>";
}
if ($i == 0)
echo "<tr><td colspan='$colspan' align=center height=100 class=contentbg>해당되는 광고가 없습니다.</td></tr>";
echo "<tr><td colspan='$colspan' class='line2'></td></tr>";
echo "</table>";
$pagelist = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<table width=100% cellpadding=3 cellspacing=1>";
echo "<tr><td width=50%>";
echo "</td>";
echo "<td width=50% align=right>$pagelist</td></tr></table>\n";
if ($stx)
echo "<script language='javascript'>document.fsearch.sfl.value = '$sfl';</script>\n";
?>
-------------------------------------------------------------------------------------
위에서 아래 if문이 왜 안되는 건가요...?;; echo 부분 찾아서 해봤는데 잘 안되네요..;
if($row[bn_location] == x)
{
echo '123456789';
}
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339