回答編集履歴

2

修正

2016/12/21 06:28

投稿

ttyp03
ttyp03

スコア16998

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  $fp = fopen("ファイルパス/ファイル名.csv", "a");
6
6
 
7
- while ($row = pg_fetch_row($result)) {
7
+ while ($row = pg_fetch_row($res)) {
8
8
 
9
9
  fprintf($fp, "%s,%s\n", substr($row['datas'], 0, 3), substr($row['datas'], 6) );
10
10
 

1

修正

2016/12/21 06:28

投稿

ttyp03
ttyp03

スコア16998

test CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  ```php
4
4
 
5
+ $fp = fopen("ファイルパス/ファイル名.csv", "a");
6
+
5
7
  while ($row = pg_fetch_row($result)) {
6
8
 
7
- fprintf($fp, "%s,%s\n", substr($row['datas'], 0, 3), substr($row['datas'], 3) );
9
+ fprintf($fp, "%s,%s\n", substr($row['datas'], 0, 3), substr($row['datas'], 6) );
8
10
 
9
11
  }
10
12