質問編集履歴
2
プログラムの変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,21 @@
|
|
24
24
|
|
25
25
|
```
|
26
26
|
|
27
|
+
|
28
|
+
|
27
|
-
|
29
|
+
Notice: Undefined variable: col1 in /Applications/MAMP/htdocs/www/csvvvv.php on line 29
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
Warning: fputcsv() expects parameter 2 to be array, null given in /Applications/MAMP/php on line 29
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
Notice: Undefined variable: col2 in /Applications/MAMP/php on line 30
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
Warning: fputcsv() expects parameter 2 to be array, null given in /Applications/MAMP/on line 30
|
28
42
|
|
29
43
|
```
|
30
44
|
|
@@ -54,7 +68,7 @@
|
|
54
68
|
|
55
69
|
|
56
70
|
|
57
|
-
$query = "SELECT COL
|
71
|
+
$query = "SELECT COL1,COL2 FROM TABLE";
|
58
72
|
|
59
73
|
|
60
74
|
|
@@ -62,9 +76,9 @@
|
|
62
76
|
|
63
77
|
ini_set( 'display_errors', 1 );
|
64
78
|
|
65
|
-
$col1 = array("COL
|
79
|
+
$col1 = array("COL1");
|
66
80
|
|
67
|
-
$col2 = array("COL
|
81
|
+
$col2 = array("COL2");
|
68
82
|
|
69
83
|
|
70
84
|
|
@@ -72,9 +86,9 @@
|
|
72
86
|
|
73
87
|
ini_set( 'display_errors', 1 );
|
74
88
|
|
75
|
-
$col1 = $row['COL
|
89
|
+
$col1 = $row['COL1'];
|
76
90
|
|
77
|
-
$col2 = $row['COL
|
91
|
+
$col2 = $row['COL2'];
|
78
92
|
|
79
93
|
|
80
94
|
|
@@ -82,7 +96,7 @@
|
|
82
96
|
|
83
97
|
}
|
84
98
|
|
85
|
-
|
99
|
+
|
86
100
|
|
87
101
|
ini_set( 'display_errors', 1 );
|
88
102
|
|
@@ -105,6 +119,8 @@
|
|
105
119
|
fclose($f);
|
106
120
|
|
107
121
|
ini_set( 'display_errors', 1 );
|
122
|
+
|
123
|
+
$mysqli->close();
|
108
124
|
|
109
125
|
?>
|
110
126
|
|
1
スペルミス
test
CHANGED
File without changes
|
test
CHANGED
@@ -102,7 +102,7 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
close($f);
|
105
|
+
fclose($f);
|
106
106
|
|
107
107
|
ini_set( 'display_errors', 1 );
|
108
108
|
|