le 02/06/2009 à 14:14
Erreur requete php
Je ne comprend pas quel est l'erreur dans mon code :
<?php
$query_theme = "SELECT *
FROM theme_stag, comp_stag
WHERE theme_stag.id_theme_stag=comp_stag.id_theme_stag
AND acquis_en_sortie='Y'
AND id_fich_stag=" . "'$id_fich_stag'";
$result3 = mysql_query($query_theme, $connection);
$affected_rows3 = mysql_num_rows($result3);
if($affected_rows3 > 0)
{ mysql_data_seek($result3,0);
for ($j = 0; $j < $affected_rows3; $j++)
{
$lib_theme = mysql_result($result3, $j, 'lib_theme_stag');
echo "<p class='alinea'><strong>Thème :</strong> ".$lib_theme."</p>";
echo "<p class='alinea'><strong>Sous thème :</strong> ".$lib_comp_stag."</p>";
}
}
else
{
echo "<p class='alinea'><strong>Aucun thème acquis dans ce module</strong></p>";
}
?>