Bonjour,

j'ai un probleme avec mon script, ce que je recherche a faire c'est d'afficher toutes les soirées lier a une categorie précise,

Par exemple la soirée est classé dans un club dont la categorie est Boites
bah j'aimerai afficher toutes les soirées liers a la categories boites

j'ai donc deux tables une premiere table nommé club ou j'ai touts les clubs et ou est donc enregistrer la categorie, et une table soiree ou est enregistrer toutes les soirées dont je recuperes l'id du club ou sera organisé la soiree

j'aimerai donc recuperer les ids de tout les clubs ayant pour categorie boites et avec ces ids recuperer les soirées de la table soiree j'ai déjà un code mais apparmeent il y a un bug voila le code :

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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
 
include("mysqlcon.php");
include("recuperation.php");
$cat = $_GET["cat"];
 
$retours_total = mysql_query("SELECT * FROM club where cat='$cat'");
$infclub = mysql_fetch_array($retours_total);
 
$idclubcat =  $infclub["id"];
$retour_total = mysql_query("SELECT COUNT(*) AS total FROM soiree where idclub='$idclubcat'");
$donnees_total = mysql_fetch_assoc($retour_total);
 
$total = $donnees_total['total'];
 
$messageParPage = 5;
 
$nombreDePage = ceil($total/$messageParPage);
 
 
if(isset($_GET['gb'])){
	$pageActuelle = intval($_GET['gb']);
 
	if($pageActuelle>$nombreDePage){
		$pageActuelle = $nombreDePage;
	}
}else{
	$pageActuelle = 1;
}
 
$premiereEntree = ($pageActuelle-1)*$messageParPage;
 
$retour_messages = mysql_query("SELECT * FROM soiree where idclub='$idclubcat' LIMIT $premiereEntree, $messageParPage");
$i = 0;
 
?>
 
<script language="JavaScript">
//PLF-http://www.jejavascript.net/
function fenetreCent(url,nom,largeur,hauteur,options) {
var haut=(screen.height-hauteur)/2;
var Gauche=(screen.width-largeur)/2;
fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}
</script>
</head>
<style type="text/css">
<!--
.Style7 {
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	color: #269ba8;
	font-weight: bold;
}
.Style9 {font-size: 11px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
.Style14 {font-size: 11px; font-family: Arial, Helvetica, sans-serif; color: #000000; }
.Style15 {color: #000000}
-->
</style>
 
<?
$sql_club = mysql_query("SELECT * from soiree where idclub='$idclubcat' order by datecalendrier DESC LIMIT $premiereEntree,$messageParPage");
 
while ($sql_i_s = mysql_fetch_array($retour_messages)) {
 
 
$id_club = $sql_i_s["idclub"];
$sql_clu = mysql_query("Select * from club where id='$idclubcat'");
$sql_i_se = mysql_fetch_array($sql_clu);
 
$affiche = $sql_i_s["affiche"];
$nom_de_soiree = $sql_i_s["nom"];
$date_soiree = $sql_i_s["datesoiree"];
$nom_de_club = $sql_i_se["nom"];
$region = $sql_i_se["region"];
$lieu = $sql_i_se["ville"];
$cp = $sql_i_se["codep"];
$adresse = $sql_i_se["adresse"];
$web = $sql_i_se["web"];
$map = $sql_i_se["map"];
$heure = $sql_i_s["heure"];
$prix = $sql_i_s["prix"];
$info = $sql_i_s["info"];
$idsoiree = $sql_i_s["id"];
$content .= '
<table width="665" border="0">
  <tr>
    <td width="157">&nbsp;</td>
<td width="633"><table width="620" border="0">
  <tr>
    <td width="192" rowspan="6" valign="top"><a href="'.$affiche.'" rel="lightbox" ><img src="'.$affiche.'" height="270" width="192" border="0" /></a></td>
    <td colspan="2" align="right" background="http://www.nomdusite.com/images/bg_titre.jpg"><span class="Style7">'.$nom_de_soiree.'&nbsp;&nbsp;</span></td>
  </tr>
  <tr>
    <td height="161" colspan="2" background="http://www.nomdusite.com/images/bg_soiree.jpg" valign="top"><table width="421" border="0">
      <tr>
        <td width="189"><span class="Style9">&nbsp;Nom du club : </span></td>
        <td width="255"><span class="Style14"> '.$nom_de_club.'</span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Région :</span></td>
        <td><span class="Style14">'.$region.'</span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Ville : </span></td>
        <td><span class="Style14">'.$lieu.'</span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Code postale :</span></td>
        <td><span class="Style14">'.$cp.'</span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Adresse :</span></td>
        <td><span class="Style14">'.$adresse.'</span></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td><span class="Style15"></span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Website :</span></td>
        <td><a href="'.$web.'" target="_blank" class="Style14">'.$web.'</a></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Plan :</span></td>
        <td><a href="javascript:fenetreCent(&quot;'.$map.'&quot;,&quot;fencent&quot;,600,300,&quot;menubar=no,scrollbars=no,statusbar=no&quot;)" class="Style14">Cliquez ici pour voir le plan </a></td>
      </tr>
<tr>
        <td><span class="Style9">&nbsp;Date :</span></td>
        <td><span class="Style14">'.$date_soiree.'</span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Heure :</span></td>
        <td><span class="Style14">'.$heure.'</span></td>
      </tr>
      <tr>
        <td><span class="Style9">&nbsp;Prix :</span></td>
        <td><span class="Style14">'.$prix.'</span></td>
      </tr>
      <tr>
        <td height="21"><span class="Style9">&nbsp;Informations générales :</span></td>
        <td><span class="Style14">'.$info.'</span></td>
      </tr>
    </table></td>
    </tr>
  
  <tr>
    <td width="207">&nbsp;</td>
    <td width="207">&nbsp;</td>
  </tr>
  <tr>
    <td><a href=javascript:fenetreCent("ecrire_comment.php?id_module='.$idsoiree.'&module=soiree","fencent",600,300,"menubar=no,scrollbars=no,statusbar=no"); class="Style9"><img src="http://www.deliciouslife.be/images/write_comment.jpg" border="0" /></a></td>
    <td><a href=javascript:fenetreCent("lire_comment.php?id_module='.$idsoiree.'&module=soiree","fencent",600,300,"menubar=no,scrollbars=no,statusbar=no") class="Style14"><img src="http://www.deliciouslife.be/images/read_comment.jpg" border="0"/></a></td>
    </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>    </td>
  </tr>
</table>

   

';
}
$content .= '<br clear="both"><p id="pages">';
 
for ($i=1; $i <= $nombreDePage;$i++){
$page = $_GET["page"];
	$content .= '<a href="cat_'.$cat.'_'.$i.'.html">';
	if($i == $pageActuelle){
		$content .= '['.$i.']';
	}else{
		$content .= $i;
	}
	$content .= ' </a>';
}
$content .= '</p></table>';
 
echo $content.'<script type="text/javascript">$(\'load\').hide();</script>';
 
?>
pouvez vous m'aider a reparé ce code !

cordialement