채택완료

레코드 삭제

2021-09-28 (화) 12:53:16 1,716

게시판 뷰페이지에서요

g5_aaa(게시판 아님) 테이블의 특정 레코드를 삭제하기 위해

                <form name="update_id" action="<?php echo $board_skin_url; ?>/delete.one.php" method="post"> 
              
      
                <tr class="fade_out"> 
                    <th scope="row">po번호(po_id)</th> 
                    <td><input type="text" name="po_id" style="width:120px;" class="frm_input" value=""></td> 
                    <th style="text-align:center;"><div class="btn_list"><input type="submit" value=" 하나만 삭제 " class="btn_list"></div></th> 
                </tr> 
                </form> 

이렇게 하였구요 

<input type="text" name="po_id" style="width:120px;" class="frm_input" value=""> 여기에는 직접 번호를 넣고 실행합니다.

delete.one.php는 이렇습니다.

그런데 왜 처리되었습니다만 나오고 실제 삭제는 안되는걸까요?

<?php
include_once("../../../../../common.php");
$po_id = $_POST['po_id'];

$sql="delete g5_aaa where po_id='{$po_id}'";
sql_query($sql);


echo "처리되었습니다.";
?>
 

|

답변 1개 / 댓글 2개

채택된 답변
+20 포인트

delete from 이 빠졌어요~

답변에 대한 댓글 2개

delete from g5_aaa where po_id='{$po_id}'
2021-09-28 (화) 13:03:42
감사합니다~ 잘되네요 ㅎ

답변을 작성하려면 로그인이 필요합니다.