이 오류에 대한 질문이요.. > 그누3질답

그누3질답

이 오류에 대한 질문이요.. 정보

그누보드 이 오류에 대한 질문이요..

본문

게시판 관리자는 전체선택/해제, 전체삭제 부분이 보이잖아요..

근데..전체 삭제를 누르면 이런 메시지가 떠요..

select * from where wr_id = '3'

1064 : 'SQL 구문에 오류가 있습니다.' 에러 같읍니다. ('where wr_id = '3' ' 명령어 라인 1)

sql 구문에 오류가 있다고 하는데..어디 부분을 봐야 할지..
  • 복사

댓글 전체

<!-- 검색 창 -->
<table width='<?=$width?>' border="0" align=center cellpadding="0" cellspacing="0">
<form name=fsearch method=get action='./'>
<input type=hidden name=doc value='<?=$doc?>'>
    <input type=hidden name=bo_table value='<?=$bo_table?>'>
<td width=50% align=right>
<select name=sselect class=select>
                <option value="wr_subject|wr_content">제목+내용</option>
                <option value="wr_name">이름</option>
                <option value="wr_num">번호</option>
                <option value="wr_datetime">날짜</option>
                <option value="wr_subject">제목</option>
                <option value="wr_content">내용</option>
            </select>
<input type=text name=stext size=10 itemname='검색어' value='<?=$stext?>' class=input>
<select name=soperator class=select>
            <option value='0'>OR</option>
        <option value='1'>AND</option>
</select>
<input type=submit value='검색' class=button>
    </td>
    </form>
</table>

<!-- 리스트 보기 -->
<table width='<?=$width?>' border="0" align=center cellpadding="0" cellspacing="0"><tr>
    <td>
      <table width=100% border=0 cellpadding=0 cellspacing=0>
        <form name=frmgblist method='post' action='<?="./?doc=$cfg[bbs_dir]/gbdeleteall.php"?>'>
       
          <tr align=center class='subject subjectbg ht'>
            <td width=10 height="30" valign="top"><img src="img/2top1.gif" width="10" height="30"></td>
            <td width=50 height="30" background="img/2topbg.gif">
  <input type=hidden name=bo_table2 value='<?=$bo_table?>'>
              <input type=hidden name=sselect2  value='<?=$sselect?>'>
  <input type=hidden name=stext2    value='<?=$stext?>'>
              <input type=hidden name=section  value='<?=$section?>'>
  <input type=hidden name=page    value='<?=$page?>'>
              <?=subject_sort_link('wr_num', $qstr2)?>
              <img src="./img/no.gif" width="17" height="13" border="0"></td>
            <? if ($is_category) { ?>
            <td width=40 height="30" background="img/2topbg.gif">
              <?=subject_sort_link('ca_id', $qstr2)?>
            </td>
            <? } ?>
            <td width='340' height="30" background="img/2topbg.gif">
              <?=subject_sort_link('wr_subject', $qstr2)?>
              <img src="./img/subject.gif" width="44" height="13" border="0"></td>
            <td width=100 height="30" background="img/2topbg.gif">
              <?=subject_sort_link('wr_name', $qstr2)?>
              <img src="./img/name.gif" width="34" height="13" border="0"> </td>
            <td width=60 height="30" background="img/2topbg.gif">
              <?=subject_sort_link('wr_datetime', $qstr2)?>
              <img src="./img/date.gif" width="29" height="13" border="0"> </td>
            <td width=30 height="30" background="img/2topbg.gif">
              <?=subject_sort_link('wr_hit', $qstr2)?>
              <img src="./img/hit.gif" width="18" height="13" border="0"> </td>
            <? if ($is_good) { ?>
            <td width=30 height="30" background="img/2topbg.gif">
              <?=subject_sort_link('wr_good', $qstr2)?>
            </td>
            <? } ?>
            <? if ($is_nogood) { ?>
            <td width=11 height="30" valign="top"><img src="img/2top2.gif" width="10" height="30">
            </td>
            <? } ?>
          </tr>
          <? for ($i=0; $i<count($list); $i++) { ?>
          <tr align=center class=list<?=($i%2)?>>
            <td width="10" height=25>&nbsp; </td>
            <td height=25>
              <?=$list[$i][num]?>
            </td>
            <? if ($is_category) { ?>
            <td>
              <?=$list[$i][ca_name]?>
            </td>
            <? } ?>
            <td align=left>
              <? if ($is_checkdelete) { ?>
              <input type=checkbox name=chk_wr_id[] value='<?=$list[$i][wr_id]?>'>
              <? } ?>
              &nbsp;
              <?=$list[$i][reply]?>
              <a href='<?=$list[$i][href]?>'>
              <? if ($list[$i][is_notice]) echo "<b>"; ?>
              <?=$list[$i][subject]?>
              <? if ($list[$i][is_notice]) echo "</b>"; ?>
              </a> <span style='font-size:8pt;'>
              <?=$list[$i][commentcnt]?>
              </span>
            </td>
            <td nowrap>
              <?=$list[$i][name]?>
            </td>
            <td>
              <?=$list[$i][datetime]?>
            </td>
            <td>
              <?=$list[$i][wr_hit]?>
            </td>
            <? if ($is_good) { ?>
            <td class=list>
              <?=$list[$i][wr_good]?>
            </td>
            <? } ?>
            <? if ($is_nogood) { ?>
            <td width="10" class=list>&nbsp; </td>
            <? } ?>
          </tr>
          <? } ?>
          <? if (count($list) == 0) { echo "<tr><td colspan=8 align=center height=100 class='content contentbg'>자료가 없습니다.</td></tr>"; } ?>
        </form>
      </table>

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="10" height="17" align="left" valign="top">
<img src="img/bt1.gif" width="10" height="17"></td>
          <td background="img/btbg.gif">&nbsp;</td>
          <td width="84" height="17" align="right" valign="top">
<img src="img/text.gif" width="84" height="17"></td>
          <td width="10" height="17" align="right" valign="top">
<img src="img/bt2.gif" width="10" height="17"></td>
        </tr>
      </table>
      <table width=100%>
<tr>
  <td width=50% align=right>
<? echo "<a href='./?doc=$cfg[bbs_dir]/gnuboard.php&bo_table=$bo_table'><img src='img/list2.gif' onMouseOver=this.src='img/list2_over.gif' onMouseOut=this.src='img/list2.gif' border=0 >"; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='img/write2.gif' onMouseOver=this.src='img/write2_over.gif' onMouseOut=this.src='img/write2.gif' border=0></a>"; } ?>
     
        <? if ($is_checkdelete) { ?>
            <a href='javascript:all_checked(true);'>전체선택</a>/<a href='javascript:all_checked(false);'>해제</a>
    <a href='javascript:all_delete();'>선택삭제</a>
<script language='javascript'>
function all_checked(sw)
{
var f = document.frmgblist;

for (var i=0; i<f.length; i++) {
if (f.elements[i].name == 'chk_wr_id[]') {
f.elements[i].checked = sw;
}
}
}

function all_delete()
{
var f = document.frmgblist;
var chk_count = 0;

for (var i=0; i<f.length; i++) {
if (f.elements[i].name == 'chk_wr_id[]' && f.elements[i].checked) {
chk_count++;
}
}

if (!chk_count) {
alert("게시물을 하나 이상 선택하세요.");
return;
}

if (!confirm("선택한 게시물을 정말 삭제 하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다")) {
return;
}

f.submit();
}
        </script>
<? } ?>
    </td>
</tr>
</table>

<? if ($stext) { ?>
    <script language='JavaScript'>
        if ('<?=$sselect?>' == 'ca_id') {
            document.fcategory.ca_id.value = '<?=$stext?>';
            document.fsearch.stext.value = '';
        } else {
            document.fsearch.sselect.value  = '<?=$sselect?>';
            document.fsearch.soperator.value = '<?=(int)$soperator?>';
        }
    </script>
<? } ?>

<table width=100% border="0" cellpadding="0" cellspacing="0">
<tr>
    <td align=right>
        <? if ($prev_section_href) { echo "<a href='$prev_section_href'>이전검색</a>"; } ?>
        <?=$write_pages?>
        <? if ($next_section_href) { echo "<a href='$next_section_href'>다음검색</a>"; } ?>
    </td>
</tr>
</table>

</td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

소스는 이렇게 고쳤거든요..근데..뭐가 잘못 된것인지를 잘......ㅡㅡ;
© SIRSOFT
현재 페이지 제일 처음으로