質問編集履歴
1
処理Cのコードを追記いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,6 +32,10 @@
|
|
32
32
|
|
33
33
|
```PHP
|
34
34
|
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
35
39
|
<!DOCTYPE html>
|
36
40
|
|
37
41
|
<html>
|
@@ -77,3 +81,127 @@
|
|
77
81
|
</html>
|
78
82
|
|
79
83
|
```
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
```PHP
|
88
|
+
|
89
|
+
処理_Cの詳細
|
90
|
+
|
91
|
+
<?php else:?>
|
92
|
+
|
93
|
+
<?php
|
94
|
+
|
95
|
+
for ($i=$start; $i <$end ; $i++) {
|
96
|
+
|
97
|
+
$counting=count($resultAlter[$secid[$i]]);
|
98
|
+
|
99
|
+
echo "<b><u>結果レポート:".$secid[$i]."</u></b><br>";
|
100
|
+
|
101
|
+
echo '<div style=" width:500px; border:1px solid #000000; padding:10px">';
|
102
|
+
|
103
|
+
echo "登録が完了しました。".$counting."事業年度分の内訳は下記の通りです"."<br>";
|
104
|
+
|
105
|
+
for ($r=0; $r <$counting ; $r++) {
|
106
|
+
|
107
|
+
$counting1=count($resultAlter[$secid[$i]][$r]);
|
108
|
+
|
109
|
+
$ttl[]=$counting1;
|
110
|
+
|
111
|
+
echo "■".$scan[$r+2].":".$counting1."件"."<br>";
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
try
|
116
|
+
|
117
|
+
{
|
118
|
+
|
119
|
+
$stmt_A = $pdo->prepare("INSERT IGNORE INTO all_fsdb
|
120
|
+
|
121
|
+
(entityName,entityCode,taxonomyNameEng,taxonomyNameJpn,amout,amtDecimals,fsCategory,taxonomySource,accumName,yearEnd,period,unq)
|
122
|
+
|
123
|
+
VALUES (:entityName,:entityCode,:taxonomyNameEng,:taxonomyNameJpn,:amout,:amtDecimals,:fsCategory,:taxonomySource,:accumName,:yearEnd,:period,:unq)");
|
124
|
+
|
125
|
+
for ($u=0; $u <$counting1 ; $u++) {
|
126
|
+
|
127
|
+
$stmt_A->BindValue(':entityName',$result[$secid[$i]][$r][$u][11],PDO::PARAM_STR);
|
128
|
+
|
129
|
+
$stmt_A->BindParam(':entityCode',$result[$secid[$i]][$r][$u][12],PDO::PARAM_INT);
|
130
|
+
|
131
|
+
$stmt_A->BindValue(':taxonomyNameEng',$result[$secid[$i]][$r][$u][1],PDO::PARAM_STR);
|
132
|
+
|
133
|
+
$stmt_A->BindValue(':taxonomyNameJpn',$result[$secid[$i]][$r][$u][5],PDO::PARAM_STR);
|
134
|
+
|
135
|
+
$stmt_A->BindParam(':amout',$result[$secid[$i]][$r][$u][2],PDO::PARAM_INT);
|
136
|
+
|
137
|
+
$stmt_A->BindParam(':amtDecimals',$result[$secid[$i]][$r][$u][3],PDO::PARAM_INT);
|
138
|
+
|
139
|
+
$stmt_A->BindValue(':fsCategory',$result[$secid[$i]][$r][$u][4],PDO::PARAM_STR);
|
140
|
+
|
141
|
+
$stmt_A->BindValue(':taxonomySource',$result[$secid[$i]][$r][$u][6],PDO::PARAM_STR);
|
142
|
+
|
143
|
+
$stmt_A->BindValue(':accumName',$result[$secid[$i]][$r][$u][7],PDO::PARAM_STR);
|
144
|
+
|
145
|
+
$stmt_A->BindParam(':yearEnd',$result[$secid[$i]][$r][$u][8],PDO::PARAM_INT);
|
146
|
+
|
147
|
+
$stmt_A->BindParam(':period',$result[$secid[$i]][$r][$u][9],PDO::PARAM_INT);
|
148
|
+
|
149
|
+
$stmt_A->BindValue(':unq',$result[$secid[$i]][$r][$u][10],PDO::PARAM_STR);
|
150
|
+
|
151
|
+
$stmt_A->execute();
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
}
|
156
|
+
|
157
|
+
catch (PDOException $e)
|
158
|
+
|
159
|
+
{
|
160
|
+
|
161
|
+
var_dump($e->getMessage());
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
echo ("<br>合計で".array_sum($ttl)."件のレコードが登録されました"."<br>");
|
170
|
+
|
171
|
+
$ttl=array();
|
172
|
+
|
173
|
+
if (empty($resultError[$secid[$i]])) {
|
174
|
+
|
175
|
+
}else{
|
176
|
+
|
177
|
+
echo '<p style="color:#ff0000;">(注)以下の'.count($resultError[$secid[$i]]).'件のレコードを除外して 登録いたしました<p><br>';
|
178
|
+
|
179
|
+
prep($resultError[$secid[$i]]);
|
180
|
+
|
181
|
+
}
|
182
|
+
|
183
|
+
echo '</div>';
|
184
|
+
|
185
|
+
}
|
186
|
+
|
187
|
+
?>
|
188
|
+
|
189
|
+
<br>
|
190
|
+
|
191
|
+
<a href="a_input_all.php" class="button">戻る</a>
|
192
|
+
|
193
|
+
<?php
|
194
|
+
|
195
|
+
$_SESSION = array();
|
196
|
+
|
197
|
+
if (isset($_COOKIE[session_name()])) {
|
198
|
+
|
199
|
+
setcookie(session_name(), '', time()-42000, '/');}
|
200
|
+
|
201
|
+
session_destroy();
|
202
|
+
|
203
|
+
?>
|
204
|
+
|
205
|
+
<?php endif;?>
|
206
|
+
|
207
|
+
```
|