回答編集履歴

1

修正

2018/04/23 03:01

投稿

m.ts10806
m.ts10806

スコア80854

test CHANGED
@@ -48,7 +48,7 @@
48
48
 
49
49
 
50
50
 
51
- trimしたのは100[ ],[ ]1 [ ]に空白があるためです。
51
+ [trim](http://php.net/manual/ja/function.trim.php)したのは100[ ],[ ]1 [ ]に空白があるためです。
52
52
 
53
53
  おそらく整数型でDBでは定義されているので、空白が入ると文字列となってエラーとなります。
54
54
 
@@ -94,9 +94,9 @@
94
94
 
95
95
  $sql .= ' where enp_number = :enp_number'.$n.' and id = :id'.$n.';';
96
96
 
97
- $literalStorage[':enp_number'.$n]=$did_array[0];
97
+ $literalStorage[':enp_number'.$n]=trim($did_array[0]);
98
98
 
99
- $literalStorage[':id'.$n]=$did_array[1];
99
+ $literalStorage[':id'.$n]=trim($did_array[1]);
100
100
 
101
101
  }
102
102