回答編集履歴
2
$valの間違い
test
CHANGED
@@ -20,9 +20,9 @@
|
|
20
20
|
|
21
21
|
$ary_placeholder[] = " (?, ?)";
|
22
22
|
|
23
|
-
$ary_value[] = $
|
23
|
+
$ary_value[] = $val[0]; //第一引数
|
24
24
|
|
25
|
-
$ary_value[] = $
|
25
|
+
$ary_value[] = $val[1]; //第二引数
|
26
26
|
|
27
27
|
}
|
28
28
|
|
1
配列宣言
test
CHANGED
@@ -11,6 +11,10 @@
|
|
11
11
|
|
12
12
|
|
13
13
|
```PHP
|
14
|
+
|
15
|
+
$ary_placeholder = [];
|
16
|
+
|
17
|
+
$ary_value = [];
|
14
18
|
|
15
19
|
foreach($Categorylist as $val){
|
16
20
|
|
@@ -44,7 +48,7 @@
|
|
44
48
|
|
45
49
|
```
|
46
50
|
|
47
|
-
insert("insert into hogehoge(?,?),(?,?),(?,?)",["A1","A2","B1","B2","C1","C2"])
|
51
|
+
insert("insert into hogehoge values(?,?),(?,?),(?,?)",["A1","A2","B1","B2","C1","C2"]);
|
48
52
|
|
49
53
|
```
|
50
54
|
|