Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD
PHP & SGBD Forum d'entraide sur les SGBD avec PHP. Avant de poster : FAQ BDD, toutes les FAQ PHP, cours BDD et sources BDD
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 17/06/2011, 14h01   #1
Invité de passage
 
Mohamed Mouatasim
Inscription : mars 2010
Messages : 13
Détails du profil
Informations personnelles :
Nom : Mohamed Mouatasim

Informations forums :
Inscription : mars 2010
Messages : 13
Points : 4
Points : 4
Envoyer un message via MSN à mouatasim
Par défaut Deux tableaux différents

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
mouatasim est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/06/2011, 14h03   #2
Modérateur
 
Avatar de Nesmontou
 
Homme Benjamin PREVOT
Architecte de système d'information
Inscription : septembre 2004
Messages : 1 568
Détails du profil
Informations personnelles :
Nom : Homme Benjamin PREVOT
Âge : 30
Localisation : France, Nord (Nord Pas de Calais)

Informations professionnelles :
Activité : Architecte de système d'information
Secteur : Finance

Informations forums :
Inscription : septembre 2004
Messages : 1 568
Points : 2 493
Points : 2 493
Bonjour,

Tu pourrais nous montrer le code déjà mise en place ?
__________________
Si vous ne pouvez expliquer un concept à un enfant de six ans, c'est que vous ne le comprenez pas complètement. Albert EINSTEIN

F.A.Q. : Java, PHP, (X)HTML / CSS

N'oubliez pas de cliquer sur le bouton Résolu en bas de page quand vous avez obtenu une solution à votre problème
Nesmontou est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 17/06/2011, 14h23   #3
Invité de passage
 
Mohamed Mouatasim
Inscription : mars 2010
Messages : 13
Détails du profil
Informations personnelles :
Nom : Mohamed Mouatasim

Informations forums :
Inscription : mars 2010
Messages : 13
Points : 4
Points : 4
Envoyer un message via MSN à mouatasim
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&nbsp;Ref</th>
	  <th class="th1">Task&nbsp;Type</th>
	   <th class="th1">Title</th>
	   <th class="th1">Description</th>
	   <th class="th1">Raised&nbsp;By</th>
	   <th class="th1">Date&nbsp;Raised</th>
	   <th class="th1">Status</th>
	   <th class="th1">Requested&nbsp;J2</th>
	   <th class="th1">Assigned&nbsp;to</th>
	   <th class="th1">PM&nbsp;costs</th>
	   <th class="th1">TQF&nbsp;costs</th>
	   <th class="th1">MEP&nbsp;costs </th>
	   <th class="th1">Total&nbsp;costs&nbsp;France</th>
	   <th class="th1">Total&nbsp;costs&nbsp;Morocco</th>
	   <th class="th1">Total&nbsp;costs</th>
	   <th class="th1">OTC&nbsp;Dir&nbsp;approval </th>
	   <th class="th1">initial&nbsp;J2 </th>
	   <th class="th1">final&nbsp;J2 </th>
	   <th class="th1">Date&nbsp;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&nbsp;progress</th>
	   <th class="th1">Author</th>
	   <th class="th1">Status</th>
	   <th class="th1">Requested&nbsp;J2</th>
	   <th class="th1">Planned&nbsp;J2</th>
	   <th style="width: 300px;" class="th1">Comment</th>
	   </tr>
	   </table>
 
 
 
 
 
</div>
mouatasim est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 01h09.


 
 
 
 
Partenaires

Hébergement Web