質問編集履歴

2

書籍の改善

2020/07/31 04:10

投稿

nguyenseiji
nguyenseiji

スコア156

test CHANGED
File without changes
test CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
 
32
32
 
33
- 『処理部分』
33
+ エラーの原因であろう処理部分』
34
34
 
35
35
  ```php
36
36
 

1

エラー項目の修正

2020/07/31 04:10

投稿

nguyenseiji
nguyenseiji

スコア156

test CHANGED
File without changes
test CHANGED
@@ -40,25 +40,59 @@
40
40
 
41
41
 
42
42
 
43
- $selectedId = true;
43
+ $sql="insert into hagoli(categoli,tittle,method,explanation,price,stock,image1,image2,image3,image4,image5,image6,image7,image8,image9,image10) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
44
+
45
+
44
46
 
45
47
 
46
48
 
47
49
 
48
50
 
49
- $stmt = $dbh->exec("SELECT id from hagoli WHERE id != (SELECT MIN(id) FROM hagoli)");
51
+ $stmt = $dbh->prepare($sql);
50
52
 
51
53
 
52
54
 
53
55
 
54
56
 
57
+ $data = array();
55
58
 
59
+ $data[] = $categoli;
56
60
 
57
-
61
+ $data[] = $tittle;
58
62
 
59
-
63
+ $data[] = $seiji;
60
64
 
65
+ $data[] = $explanation;
66
+
67
+ $data[] = $price;
68
+
61
- var_dump($stmt);
69
+ $data[] = $stock;
70
+
71
+ $data[] = $image1;
72
+
73
+ $data[] = $image2;
74
+
75
+ $data[] = $image3;
76
+
77
+ $data[] = $image4;
78
+
79
+ $data[] = $image5;
80
+
81
+ $data[] = $image6;
82
+
83
+ $data[] = $image7;
84
+
85
+ $data[] = $image8;
86
+
87
+ $data[] = $image9;
88
+
89
+ $data[] = $image10;
90
+
91
+
92
+
93
+
94
+
95
+ $stmt->execute($data);
62
96
 
63
97
 
64
98