
09/03/2013, 09:03
|
| | Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 14 años, 6 meses Puntos: 6 | |
problema para generar tabla desde consulta hola amigos espero me puedan ayudar , porque no puedo colocar ceros y unos en en las dos ultimas columnas de una tabla
este es mi código
<table class="table table-bordered table-hover">
<tr>
<td width="134"><strong>Tipo de Estación </strong></td>
<?
foreach($nv as $field)
{
$cuentaconsultavolcan = $field['count'];
}
?>
<?
$i=1;
foreach($lv as $field)
{
if($i <= $cuentaconsultavolcan) {
?><th><div align="center"><? echo $field['alias']?></div></th>
<?
}
$i++;
}
?>
<th><div align="center">Total TELEM</div></th>
<th><div align="center">Total NO TELEM</div></th>
</tr>
<?
foreach($e2 as $field)
{
if($area != $field['codigoarea']) {
echo '<tr><td colspan=12><div align=center><strong>'.$field['nombrearea'].'</strong></div></td></tr>';
}
$area=$field['codigoarea'];
if($estacion != $field['codigotipoestacion']){
echo '<tr>';
echo '<td>'.$field['nombreestacion'].'</td>';
//echo '<td>s</td>';
//echo '<td>s</td>';
}
echo '<td>';
if($field['cantidad']==NULL){
//echo ' ';
//echo "<a href='#' class='username' data-pk=''>0</a>";
?>
<div align="center"><a href="#" id="<? echo $field['item']?>" class="edit-address" data-type="address" data-pk="<? echo $field['item']?>"><strong>0</strong></a></div>
<?
}else{
?>
<div align="center"><a href="#" id="<? echo $field['item']?>" class="edit-address" data-type="address" data-pk="<? echo $field['item']?>"><strong><? echo $field['cantidad'] ?></strong></a></div>
<?
}
'</td>';
$estacion=$field['codigotipoestacion'];
}
?>
<td></td>
<tr>
<td width="134">Total</td>
<?
foreach($to as $field)
{
?>
<td><div align="center" style="color:#000000;"><strong><? echo $field['sum']?></strong></div></td>
<?
}
?>
</tr>
</table> |