CON113_1.php
1.55 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
38
39
40
41
42
43
44
<?php
//*****************************************************************************
//*
//* プログラム名:電子会議室カテゴリDB設定処理(削除)
//* プログラムID:CON113.PHP
//* 機能 :電子会議室カテゴリ情報を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 mst_kaigi_category WHERE category_no=".$_POST["category_no"];
$rsResult = pg_exec($pg_con,$strSql);
//会議番号抽出
$strSql = "select meeting_no from kaigi_info_tbl where category_no = ".$_POST["category_no"];
$rsResult = pg_exec($pg_con,$strSql);
if(pg_numrows($rsResult) > 0){
$strWhere = "";
for($i=0;$i<pg_numrows($rsResult);$i++){
$strWhere .= " meeting_no = ".pg_result($rsResult,$i,"meeting_no");
if($i < (pg_numrows($rsResult) - 1)){
$strWhere .= ", or";
}
}
//各会議データ削除
$strSql = "DELETE FROM kaigi_info_tbl WHERE".$strWhere;
$rsRes = pg_exec($pg_con,$strSql);
$strSql = "DELETE FROM kaigi_tbl WHERE".$strWhere;
$rsRes = pg_exec($pg_con,$strSql);
$strSql = "DELETE FROM pkaigi_tbl WHERE".$strWhere;
$rsRes = pg_exec($pg_con,$strSql);
}
header("Location: CON110.php");
?>