Tema: Tablas y php
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/05/2011, 18:36
kozenko
 
Fecha de Ingreso: octubre-2010
Mensajes: 83
Antigüedad: 14 años, 4 meses
Puntos: 1
Tablas y php

Hola!
estoy buscando que por cada usuario haga un <tr></tr>
Y lo unico que logro es hacer que diga un solo usuario y no todos lo que tienen los permison determinados.
aca esta el code:
Código PHP:
<FONT color="#FF0000"><h4 align="left">Super Admins:</h4></FONT>
<?php
connect
();
$sql "SELECT * from users WHERE permissions = '1' ORDER BY id DESC"$res mysql_query($sql); $row mysql_fetch_array($res);
?>
<table width="100%" border="0">
<tr>
<td> <?php echo $row['username']; ?>
</td>
</tr>
</table><br>

<FONT color="#008000"><h4 align="left">Admins:</h4></FONT>
<?php
$sql 
"SELECT * from users WHERE permissions = '2' ORDER BY id DESC"$res mysql_query($sql); $row mysql_fetch_array($res);
?>
<table width="100%" border="0">
<tr>
<td> <?php echo $row['username']; ?>
</td>
</tr>
</table><br>

<FONT color="#FFA500"><h4 align="left">Alpha Team:</h4></FONT>
<?php
$sql 
"SELECT * from users WHERE permissions = '3' ORDER BY id DESC"$res mysql_query($sql); $row mysql_fetch_array($res);
?>
<table width="100%" border="0">
<tr>
<td> <?php echo $row['username']; ?>
</td>
</tr>
</table><br>
Nota: connect es una funcion definida mas arriba