回答編集履歴
1
chousei
test
CHANGED
@@ -16,17 +16,17 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
-
create table articles_users(id int,user_id
|
19
|
+
create table articles_users(id int,user_id int,article_id int);
|
20
20
|
|
21
21
|
insert into articles_users values
|
22
22
|
|
23
|
-
(1,
|
23
|
+
(1,1,1),
|
24
24
|
|
25
|
-
(1,
|
25
|
+
(1,2,1),
|
26
26
|
|
27
|
-
(1,
|
27
|
+
(1,3,2),
|
28
28
|
|
29
|
-
(1,
|
29
|
+
(1,4,2);
|
30
30
|
|
31
31
|
|
32
32
|
|
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
from articles_users
|
40
40
|
|
41
|
-
where t1.
|
41
|
+
where t1.id=user_id
|
42
42
|
|
43
43
|
group by user_id
|
44
44
|
|