Salut a tous ,
bon j'ai de tableau different le 1ér lier avec BDD , et je veux quand je clic sur une ligne de 1ér tableau ; le 2éme tableau affiche des details depuis BDD
et merci d'avance
Version imprimable
Salut a tous ,
bon j'ai de tableau different le 1ér lier avec BDD , et je veux quand je clic sur une ligne de 1ér tableau ; le 2éme tableau affiche des details depuis BDD
et merci d'avance
Bonjour,
Tu pourrais nous montrer le code déjà mise en place ?
Code:
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
113
114
115
116
117
118
119 <div id="contnent"> <div id="rightable"> <form action="creation_update.php"> <table id="rightbl" cellpadding="2" cellspacing="0"> <tr class="th1b"> <th class="th1">Contract</th> <th class="th1">Task Ref</th> <th class="th1">Task Type</th> <th class="th1">Title</th> <th class="th1">Description</th> <th class="th1">Raised By</th> <th class="th1">Date Raised</th> <th class="th1">Status</th> <th class="th1">Requested J2</th> <th class="th1">Assigned to</th> <th class="th1">PM costs</th> <th class="th1">TQF costs</th> <th class="th1">MEP costs </th> <th class="th1">Total costs France</th> <th class="th1">Total costs Morocco</th> <th class="th1">Total costs</th> <th class="th1">OTC Dir approval </th> <th class="th1">initial J2 </th> <th class="th1">final J2 </th> <th class="th1">Date Closed </th> </tr> <?php include("Connection.php"); //Connexion a la base de donnée $a=$_POST['Con']; //Valure de liste déroulante du Contract $b=$_POST['Portf']; //Valure de liste déroulante du Portfolio $c = $_POST['Origine']; //Valure de Radio button du Status if (empty ($a) && empty ($b) && empty($c)) { //Test du remplissage des champs precedente $retour = mysql_query("SELECT distinct Contract, Task_Ref, Type , Title, Description, Raised_By, Date_Raised,Status,Requested_J2,PM_Costs, TQF_costs,OTC_Dir_approval,Date_Closed FROM Contract, Task, Task_Type,Status,Task_Progress WHERE Contract.Id_Contract=Task.Id_Contract and Task_Type.Id_Task_Type = Task.Id_Task_Type and Status.Id_Status=Task_Progress.Id_Status" );} // Si les champs sans vide cette req affiche tous les enregistrement sans filtrage if (!empty ($a) && !empty ($b) && !empty ($c)) // si les champs sont remplis on affiche les enregistrement //avec le filtrage choisi { $retour = mysql_query("SELECT distinct Contract, Task_Ref, Type , Title, Description, Raised_By, Date_Raised,Status,Requested_J2,PM_Costs, TQF_costs,OTC_Dir_approval,Date_Closed FROM Contract, Task, Task_Type,Status,Task_Progress,Portfolio WHERE Contract.Id_Contract=Task.Id_Contract and Task_Type.Id_Task_Type = Task.Id_Task_Type and Status.Id_Status=Task_Progress.Id_Status and Contract.Contract='$a' and Portfolio.Id_portfolio=Contract.Id_Portfolio and Portfolio='$b' and Status='$c' "); } while ($donnees = mysql_fetch_array($retour)) { ?> <tr> <!-- Remplissage de tableau selon la req precedent --> <td><a href=""><?php echo stripslashes($donnees['Contract']); ?></a></td> <td><?php echo stripslashes($donnees['Task_Ref']); ?></td> <td><?php echo stripslashes($donnees['Type']); ?></td> <td><?php echo stripslashes($donnees['Title']); ?></td> <td><?php echo stripslashes($donnees['Description']); ?></td> <td><?php echo stripslashes($donnees['Raised_By']); ?></td> <td><?php echo stripslashes($donnees['Date_Raised']); ?></td> <td><?php echo stripslashes($donnees['Status']); ?></td> <td><?php echo stripslashes($donnees['Requested_J2']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['TQF_costs']); ?></td> <td><?php echo stripslashes($donnees['MEP_costs']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['OTC_Dir_approval']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['']); ?></td> <td><?php echo stripslashes($donnees['Date_Closed']); ?></td> </tr> <?php } ?> </table></div> <div align="center"> <table id="rightbl" cellpadding="2" cellspacing="0" border="0"> <tr class="th1b"> <th class="th1">Date progress</th> <th class="th1">Author</th> <th class="th1">Status</th> <th class="th1">Requested J2</th> <th class="th1">Planned J2</th> <th style="width: 300px;" class="th1">Comment</th> </tr> </table> </div>