Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/07/2010, 13:27
sadzas
 
Fecha de Ingreso: junio-2008
Mensajes: 137
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: while dentro de un If

Esto no me funciona....
Código:
if (!$usuario)
{
$numero = obtengoCantidadConferencias($selectCompany);
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
        <th scope="row" width="1%" bgcolor="#ffffff">&nbsp;</th>
        <td width="30%" class="texto" bgcolor="#ffffff" align="left">Total created conferences: <? echo $numero ?></td>
        <td>&nbsp;</td>
</tr>
</table>
<?
$db = new MySQL();
$consulta = $db->consulta("SELECT loquesea FROM whatever");
        while ($registros = $db->fetch_array($consulta))
        {
        ?>
        <table width="100%" border="0" cellpadding="1" cellspacing="1">
        <tr>
                <th width="40%" class="texto" scope="row">Start Time</th>
                <td width="45%" class="texto" align="center">End Time</td>
                <td width="15%" class="texto" align="center">Max Users</td>
        </tr>
        </table>                 
        <table width="100%" border="0">
        <tr>
                <th width="40%" class="texto" scope="row"><? echo $registros[0] ?></th>
                <td width="45%" class="texto" align="center"><? echo $registros[1] ?></td>
                <td width="15%" class="texto" align="center"><? echo $registros[2] ?></td>
        </tr>
        </table>
        <?
        }
} else {
El while no se ejecuta dentro del if... no entiendo porque.