Código PHP:
`Difunto_ID` int(10) unsigned NOT NULL default '0',
`FMuerte` date default NULL,
`FEnterramiento` date default NULL,
`Nombre_Apellido` varchar(100) default NULL,
`Edad` varchar(15) default NULL,
`Inhumacion` int(10) unsigned default NULL,
`Defuncion_Local` int(10) unsigned default NULL,
`Parroquia` varchar(15) default NULL,
`Cod_Boveda` int(10) unsigned default NULL,
`Tipo_Boveda` varchar(10) default NULL,
`Bloque` int(2) unsigned default NULL,
`Gratis` int(2) unsigned default '0',
Código PHP:
DIA-Tipo_Boveda
12-Sencilla
12-Sencilla
12-Sencilla
12-Sencilla
12-Sencilla
12-Sencilla
12-Sencilla
12-Doble
12-Restos
12-Infantil
12-Sencilla
13-Sencilla
Código PHP:
<table border="1" width="100%">
<tr>
<td rowspan="2" align="center" class="Reporte" width="5%"><font size="2"><b>Fecha</b></td>
<td colspan="3" align="center" class="Reporte" width="5%"><font size="2"><b>Sencillas</b></td>
<td colspan="3" align="center" class="Reporte" width="5%"><font size="2"><b>Dobles</b></td>
<td colspan="3" align="center" class="Reporte" width="5%"><font size="2"><b>Infantiles</b></td>
<td colspan="3" align="center" class="Reporte" width="5%"><font size="2"><b>Restos</b></td>
<td colspan="3" align="center" class="Reporte" width="5%"><font size="2"><b>Fetos</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Ingreso</b></td>
</tr>
<tr>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Cantidad</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Costo</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Total</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Cantidad</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Costo</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Total</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Cantidad</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Costo</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Total</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Cantidad</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Costo</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Total</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Cantidad</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Costo</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Total</b></td>
<td align="center" class="Reporte" width="5%"><font size="2"><b>Total:</b></td>
</tr>
<?php
include("config.php");
$Boveda = mysql_query("SELECT day(FMuerte) as dia, tipo_boveda FROM difuntos_totales");
$fecha;
$Sencilla=0;
$Doble=0;
$Infantil=0;
$Restos=0;
$Feto=0;
while ($row=mysql_fetch_assoc($Boveda))
{
if ($row["dia"]>0)
{
$fecha=$row["dia"];
}
if ($row["tipo_boveda"]=="Sencilla")
{
$Sencilla=$Sencilla+1;
}
if ($row["tipo_boveda"]=="Doble")
{
$Doble=$Doble+1;
}
if ($row["tipo_boveda"]=="Infantil")
{
$Infantil=$Infantil+1;
}
if ($row["tipo_boveda"]=="Restos")
{
$Restos=$Restos+1;
}
if ($row["tipo_boveda"]=="Feto")
{
$Feto=$Feto+1;
}
echo "<tr>
<td class=\"Reporte\" align=center>$fecha</span></td>
<td class=\"Reporte\" align=center>$Sencilla</span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center>$Doble</span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center>$Infantil</span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center>$Restos</span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center>$Feto</span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center> </span></td>
<td class=\"Reporte\" align=center> </span></td>"
;
$Sencilla=0;
$Doble=0;
$Infantil=0;
$Restos=0;
$Feto=0;
$fecha=0;
}
mysql_free_result($Boveda)
?>
</table>
Dia=12 SENCILLAS=8 / Dobles=1 / Restos=1 / Intanfil=1
Dia13 Sencillas=1
Todo eso en una tabla porque es un informe.... :S
Como Puedo hacer????