CON006_2.php 1.37 KB
<?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");
?>