CON006_2.php
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
//*****************************************************************************
//*
//* プログラム名:申請書類情報DB設定処理(削除)
//* プログラムID:CON006_2
//* 機能 :申請書類情報をDB設定する
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
//***************************
//* インクルードファイル
//***************************
include("include/session_start.inc"); //セッション開始
include("include/SessionChk.inc"); //セッションチェック
include("include/dbcon.inc"); //DB接続
$strSql = "DELETE FROM kessaisya_tbl WHERE sinsei_syubetu=".$_POST["sinsei_syubetu"];
$rsResult = pg_exec($pg_con,$strSql);
$strSqlkes = "DELETE FROM mst_sinsei WHERE sinsei_syubetu=".$_POST["sinsei_syubetu"];
$rsResultkes = pg_exec($pg_con,$strSqlkes);
$strSQL = "SELECT * FROM sinsei_tbl WHERE sinsei_syubetu=".$_POST["sinsei_syubetu"];
$objSinsei = pg_exec($pg_con,$strSQL);
for ($intI = 0; $intI < pg_numrows($objSinsei); $intI++) {
$recSinsei = pg_fetch_object($objSinsei, $intI);
$strDelSQL = "DELETE FROM kessaijoukyou_tbl WHERE sinsei_seq=".(int)$recSinsei->seq;
$rsDel = pg_exec($pg_con,$strDelSQL);
}
$strSqlsin = "DELETE FROM sinsei_tbl WHERE sinsei_syubetu=".$_POST["sinsei_syubetu"];
$rsResultsin = pg_exec($pg_con,$strSqlsin);
header("Location: CON006.php");
?>