Voici ma solution trouvée :
ça marche super bien!
Bonjour!
Je cherche à faire une requête à l'intérieur d'une autre et la ligne concernée est :
dans :
Je n'y arrive pas.
De l'aide serait appréciée, Merci!
Dan
Modifié par dan4 (10 Sep 2010 - 09:33)
$resultp = mysql_query(" SELECT * FROM nuked_nbconnecte ") or die(mysql_error());
while($rowp = mysql_fetch_array( $resultp )) {
$access = $rowp['username'];
}
$result = mysql_query("SELECT * FROM ".PREF."bmark ORDER BY title ASC") or die(mysql_error());
echo '<table width=100% border=0>';
$bgcolor = ($i++ & 1) ? '#611919' : '#000000';
while($row = mysql_fetch_array( $result )) {
echo '<tr bgcolor="'.$bgcolor.'" onmouseover="this.style.backgroundColor=\'#611919\';" onmouseout="this.style.backgroundColor=\''.$bgcolor.'\'"; >';
echo '<td width=95% align="center" valign="middle"><a href="'.$row['link'].'" target="_blank" title="'.$row['link'].'">'.$row['title'].'</a>';
if( $access == 'dan') {
echo '<a style="position:absolute;right:10px;margin-top:5px;background:#7C580F;color:white;border:1px solid #A09635;font-size:10px;font-family:Verdana;" href="edit.php?id=' . $row['id'] . '" title="Modification par l\'administrateur!"> E </a>';
}
echo '</td>';
}
echo '</tr></table>';
ça marche super bien!
Bonjour!
Je cherche à faire une requête à l'intérieur d'une autre et la ligne concernée est :
while($row_pseudo = mysql_fetch_array( $result_pseudo )) {
<a style="position:absolute;right:10px;margin-top:5px;background:#7C580F;color:white;border:1px solid #A09635;font-size:10px;font-family:Verdana;" href="edit.php?id=' . $row['id'] . '" title="Modification par l\'administrateur!"> E </a>
}
dans :
$result = mysql_query("SELECT * FROM ".PREF."bmark ORDER BY title ASC") or die(mysql_error());
$result_pseudo = mysql_query(" SELECT * FROM nuked_users WHERE pseudo != 'admin' GROUP BY pseudo ASC ") or die(mysql_error());
echo '<table width=100% border=0>';
$bgcolor = ($i++ & 1) ? '#611919' : '#000000';
while($row = mysql_fetch_array( $result )) {
echo '<tr bgcolor="'.$bgcolor.'" onmouseover="this.style.backgroundColor=\'#611919\';" onmouseout="this.style.backgroundColor=\''.$bgcolor.'\'"; >';
echo '<td width=95% align="center" valign="middle"><a href="'.$row['link'].'" target="_blank" title="'.$row['link'].'">'.$row['title'].'</a>
while($row_pseudo = mysql_fetch_array( $result_pseudo )) {
<a style="position:absolute;right:10px;margin-top:5px;background:#7C580F;color:white;border:1px solid #A09635;font-size:10px;font-family:Verdana;" href="edit.php?id=' . $row['id'] . '" title="Modification par l\'administrateur!"> E </a>
}
</td>';
}
echo '</tr></table>';
Je n'y arrive pas.
De l'aide serait appréciée, Merci!
Dan
Modifié par dan4 (10 Sep 2010 - 09:33)