質問編集履歴

2

テーブル構造を追加

2019/06/19 10:11

投稿

uthio
uthio

スコア18

test CHANGED
File without changes
test CHANGED
@@ -314,6 +314,38 @@
314
314
 
315
315
 
316
316
 
317
+ テーブル構造は以下の通りです。
318
+
319
+
320
+
321
+ ```SQL
322
+
323
+ CREATE TABLE Test(
324
+
325
+ no int(11) unsigned auto_increment,
326
+
327
+ title varchar(200),
328
+
329
+ status tinyint(4) DEFAULT 0,
330
+
331
+ update date,
332
+
333
+ importance tinyint(4) unsigned DEFAULT 0,
334
+
335
+ kind tinyint(3) unsigned,
336
+
337
+ group tinyint(4),
338
+
339
+ flag tinyint(4),
340
+
341
+ primary key (no)
342
+
343
+ );
344
+
345
+ ```
346
+
347
+
348
+
317
349
  https://qiita.com/suin/items/c524cf84368332db426b
318
350
 
319
351
  こちらを参考にグループ化することを考えましたが、

1

コードの修正

2019/06/19 10:11

投稿

uthio
uthio

スコア18

test CHANGED
File without changes
test CHANGED
@@ -10,171 +10,169 @@
10
10
 
11
11
  ```php
12
12
 
13
- $data =Array (
14
-
15
-
16
-
17
- [0] => Array (
18
-
19
- [no] => 89
20
-
21
- [title] => SAMPLE
22
-
23
- [status] => 保留
24
-
25
- [update] => 1900-01-01
26
-
27
- [importance] =>
28
-
29
- [kind] => 11
30
-
31
- [group] => 3
32
-
33
- [flag] => 0
34
-
35
- ),
36
-
37
- [1] => Array (
38
-
39
- [no] => 91
40
-
41
- [title] => hogehoge
42
-
43
- [status] => 開示
44
-
45
- [update] => 1900-01-01
46
-
47
- [importance] =>
48
-
49
- [kind] => 13
50
-
51
- [group] => 3
52
-
53
- [flag] => 1
54
-
55
- ),
56
-
57
- [2] => Array (
58
-
59
- [no] => 90
60
-
61
- [title] => テストタイトル
62
-
63
- [status] => 修正
64
-
65
- [update] => 1900-01-01
66
-
67
- [importance] =>
68
-
69
- [kind] => 12
70
-
71
- [group] => 3
72
-
73
- [flag] => 0
74
-
75
- ),
76
-
77
- [3] => Array (
78
-
79
- [no] => 92
80
-
81
- [title] => hogehoge
82
-
83
- [status] => 修正
84
-
85
- [update] => 1900-01-01
86
-
87
- [importance] =>
88
-
89
- [kind] => 14
90
-
91
- [group] => 3
92
-
93
- [flag] => 1
94
-
95
- ),
96
-
97
- [4] => Array (
98
-
99
- [no] => 93
100
-
101
- [title] => テストタイトル
102
-
103
- [status] => 開示
104
-
105
- [update] => 1900-01-01
106
-
107
- [importance] =>
108
-
109
- [kind] => 15
110
-
111
- [group] => 3
112
-
113
- [flag] => 1
114
-
115
- ),
116
-
117
- [5] => Array (
118
-
119
- [no] => 94
120
-
121
- [title] => SAMPLE
122
-
123
- [status] => 開示
124
-
125
- [update] => 1900-01-01
126
-
127
- [importance] =>
128
-
129
- [kind] => 16
130
-
131
- [group] => 3
132
-
133
- [flag] => 1
134
-
135
- ),
136
-
137
- [6] => Array (
138
-
139
- [no] => 95
140
-
141
- [title] => SAMPLE
142
-
143
- [status] => 保留
144
-
145
- [update] => 1900-01-01
146
-
147
- [importance] =>
148
-
149
- [kind] => 17
150
-
151
- [group] => 3
152
-
153
- [flag] => 1
154
-
155
- ),
156
-
157
- [7] => Array (
158
-
159
- [no] => NULL
160
-
161
- [title] =>hogehoge
162
-
163
- [status] => 開示
164
-
165
- [update] => 1900-01-01
166
-
167
- [importance] =>
168
-
169
- [kind] => 18
170
-
171
- [group] => 3
172
-
173
- [flag] => 1
174
-
175
- )
176
-
177
- );
13
+ $data = array (
14
+
15
+ 0 => array (
16
+
17
+ 'no' => '89',
18
+
19
+ 'title' => 'SAMPLE',
20
+
21
+ 'status' => '保留',
22
+
23
+ 'update' => '1900-01-01',
24
+
25
+ 'importance' => '小',
26
+
27
+ 'kind' => '11',
28
+
29
+ 'group' => '3',
30
+
31
+ 'flag' => '0',
32
+
33
+ ),
34
+
35
+ 1 => array (
36
+
37
+ 'no' => '91',
38
+
39
+ 'title' => 'hogehoge',
40
+
41
+ 'status' => '開示',
42
+
43
+ 'update' => '1900-01-01',
44
+
45
+ 'importance' => '中',
46
+
47
+ 'kind' => '13',
48
+
49
+ 'group' => '3',
50
+
51
+ 'flag' => '1',
52
+
53
+ ),
54
+
55
+ 2 => array (
56
+
57
+ 'no' => '90',
58
+
59
+ 'title' => 'テストタイトル',
60
+
61
+ 'status' => '修正',
62
+
63
+ 'update' => '1900-01-01',
64
+
65
+ 'importance' => '大',
66
+
67
+ 'kind' => '12',
68
+
69
+ 'group' => '3',
70
+
71
+ 'flag' => '0',
72
+
73
+ ),
74
+
75
+ 3 => array (
76
+
77
+ 'no' => '92',
78
+
79
+ 'title' => 'hogehoge',
80
+
81
+ 'status' => '修正',
82
+
83
+ 'update' => '1900-01-01',
84
+
85
+ 'importance' => '小',
86
+
87
+ 'kind' => '14',
88
+
89
+ 'group' => '3',
90
+
91
+ 'flag' => '1',
92
+
93
+ ),
94
+
95
+ 4 => array (
96
+
97
+ 'no' => '93',
98
+
99
+ 'title' => 'テストタイトル',
100
+
101
+ 'status' => '開示',
102
+
103
+ 'update' => '1900-01-01',
104
+
105
+ 'importance' => '大',
106
+
107
+ 'kind' => '15',
108
+
109
+ 'group' => '3',
110
+
111
+ 'flag' => '1',
112
+
113
+ ),
114
+
115
+ 5 => array (
116
+
117
+ 'no' => '94',
118
+
119
+ 'title' => 'SAMPLE',
120
+
121
+ 'status' => '開示',
122
+
123
+ 'update' => '1900-01-01',
124
+
125
+ 'importance' => '小',
126
+
127
+ 'kind' => '16',
128
+
129
+ 'group' => '3',
130
+
131
+ 'flag' => '1',
132
+
133
+ ),
134
+
135
+ 6 => array (
136
+
137
+ 'no' => '95',
138
+
139
+ 'title' => 'SAMPLE',
140
+
141
+ 'status' => '保留',
142
+
143
+ 'update' => '1900-01-01',
144
+
145
+ 'importance' => '中',
146
+
147
+ 'kind' => '17',
148
+
149
+ 'group' => '3',
150
+
151
+ 'flag' => '1',
152
+
153
+ ),
154
+
155
+ 7 => array (
156
+
157
+ 'no' => NULL,
158
+
159
+ 'title' => 'hogehoge',
160
+
161
+ 'status' => '開示',
162
+
163
+ 'update' => '1900-01-01',
164
+
165
+ 'importance' => '中',
166
+
167
+ 'kind' => '18',
168
+
169
+ 'group' => '3',
170
+
171
+ 'flag' => '1',
172
+
173
+ )
174
+
175
+ , )
178
176
 
179
177
  ```
180
178