j'ai 3 tables,
1:artist
2:artist_have_links
3:artists_links
voici le shema.yml
comment puis je obtenir facilement la liste des type de liens pour un artiste donné, cette liste de type ne devra pas comporté les liens qui on déjà été assigner a cet artiste. Je pense que la solution réside dans une requête imbriquée mais la je cale. Si quelqu'un pouvait m'aiguiller vers une solution je lui en serait reconnaissant.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112 Artists: connection: doctrine tableName: artists columns: id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true nom: type: string(20) fixed: false unsigned: false primary: false notnull: true autoincrement: false id_facebook: type: string(30) fixed: false unsigned: false primary: false notnull: true autoincrement: false bio: type: string(5000) fixed: false unsigned: false primary: false notnull: true autoincrement: false ordre: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false relations: ArtistsHaveLinks: local: id foreign: id_artist type: many ArtistsHaveLinks: connection: doctrine tableName: artists_have_links columns: id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true id_artist: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false id_links: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false url_link_artist: type: string(100) fixed: false unsigned: false primary: false notnull: true autoincrement: false ordre: type: integer(4) fixed: false unsigned: false primary: false notnull: true autoincrement: false relations: Artists: local: id_artist foreign: id type: one ArtistsLinks: local: id_links foreign: id type: one ArtistsLinks: connection: doctrine tableName: artists_links columns: id: type: integer(4) fixed: false unsigned: false primary: true autoincrement: true type: type: string(20) fixed: false unsigned: false primary: false notnull: true autoincrement: false relations: ArtistsHaveLinks: local: id foreign: id_links type: many
Merci d'avance.
Partager