質問編集履歴

3

追記

2017/11/07 04:01

投稿

chibi144
chibi144

スコア64

test CHANGED
File without changes
test CHANGED
@@ -23,6 +23,46 @@
23
23
  ###該当のソースコード
24
24
 
25
25
  ```php
26
+
27
+
28
+
29
+ if(isset($_POST['item_id'])){
30
+
31
+ $input_item_id = $_POST['item_id'];
32
+
33
+ } else{
34
+
35
+ $input_item_id = null;
36
+
37
+ //★エラーを表示させる?
38
+
39
+ }
40
+
41
+ if(isset($_POST['type'])){
42
+
43
+ $input_item_type = $_POST['type'];
44
+
45
+ } else{
46
+
47
+ $input_item_type = null;
48
+
49
+ //★エラーを表示させる?
50
+
51
+ }
52
+
53
+ if(isset($_POST['maker'])){
54
+
55
+ $input_item_maker_id = $_POST['maker'];
56
+
57
+ } else{
58
+
59
+ $input_item_maker_id = null;
60
+
61
+ //★エラーを表示させる?
62
+
63
+ }
64
+
65
+
26
66
 
27
67
  class DBconnect
28
68
 

2

追記

2017/11/07 04:00

投稿

chibi144
chibi144

スコア64

test CHANGED
File without changes
test CHANGED
File without changes

1

誤字

2017/11/07 04:00

投稿

chibi144
chibi144

スコア64

test CHANGED
File without changes
test CHANGED
@@ -76,7 +76,7 @@
76
76
 
77
77
  $sql = 'SELECT * FROM data where data.id = ?';
78
78
 
79
- $stmt = $this->db->query($sql); //ここでエラーが出ます
79
+ $stmt = $this->db->prepare($sql); //ここでエラーが出ます
80
80
 
81
81
  $stmt->execute(['sample']);
82
82