Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/10/2009, 13:10
Avatar de yoyoyo82
yoyoyo82
 
Fecha de Ingreso: julio-2009
Ubicación: Springfield
Mensajes: 159
Antigüedad: 14 años, 9 meses
Puntos: 1
Problema al imprimir registros solo muestra uno de los 5 en dompdf

Buenas tardes a todos caballeros disculpen tengo el siguiente problema en dompdf al imprimir los registros de mi tabla solo me imprime el primer registro y los otros 4 no me los muestra este es el codigo del pdf

<?php
mysql_connect("localhost", "root", "yoyoyo");
mysql_select_db ("prep");
include_once ('dompdf_config.inc.php');
function consulta()

{

$sql = "select distinct `t_alumnos`.`matricula`,nombre,grupo,turno,semestr e,apaterno,amaterno,mat_1,cal_1,cal_2,prom_1,mat_2 ,cal_3,cal_4,prom_2,mat_3,cal_5,cal_6,prom_3,mat_4 ,cal_7,cal_8,prom_4,mat_5,cal_9,cal_10,prom_5,mat_ 6,cal_11,cal_12,prom_6,mat_7,cal_13,cal_14,prom_7, mat_8,cal_15,cal_16,prom_8,mat_9,cal_17,cal_18,pro m_9,mat_10,cal_19,cal_20,prom_10,prom_gral from t_calificaciones inner join t_alumnos on t_calificaciones.matricula=t_alumnos.matricula inner join t_turno on t_alumnos.matricula=t_turno.matricula inner join t_grupo on t_turno.matricula=t_grupo.matricula where grupo='1º1-M'";
$result = mysql_query($sql) or die (mysql_error());
return $result;

}
$result = consulta();

$p = mysql_num_rows($result);
while($p = mysql_fetch_array($result))

{

$html =("
<HTML>
<HEAD>
<TITLE>grupo1.php</TITLE>
</HEAD>

<BODY>
<img src='logo.jpg' align='center'><br>
<br><br><br>
<h1><div align='center'>Control de Calificaciones</div></h1>
<br>
<br>






<table border='1' >
<tr>
<th>Matrícula</th>
<th>Grupo</th>
<th>Turno</th>
<th>Semestre</th>
<th>Nombre</th>
<th>A. Paterno</th>
<th>A. Materno</th>
<th>Materia 1</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_1</th>
<th>Materia 2</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_2</th>
<th>Materia 3</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_3</th>
<th>Materia 4</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_4</th>
<th>Materia 5</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_5</th>
<th>Materia 6</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_6</th>
<th>Materia 7</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_7</th>
<th>Materia 8</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_8</th>
<th>Materia 9</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_9</th>
<th>Materia 10</th>
<th>cal_1</th>
<th>cal_2</th>
<th>prom_10</th>
<th>Prom. Gral</th>
</tr>


<tr>
<td>$p[matricula]</td>
<td>$p[grupo]</td>
<td>$p[turno]</td>
<td>$p[semestre]</td>
<td>$p[nombre]</td>
<td>$p[apaterno]</td>
<td>$p[amaterno]</td>
<td>$p[mat_1]</td>
<td>$p[cal_1]</td>
<td>$p[cal_2]</td>
<td>$p[prom_1]</td>
<td>$p[mat_2]</td>
<td>$p[cal_3]</td>
<td>$p[cal_4]</td>
<td>$p[prom_2]</td>
<td>$p[mat_3]</td>
<td>$p[cal_5]</td>
<td>$p[cal_6]</td>
<td>$p[prom_3]</td>
<td>$p[mat_4]</td>
<td>$p[cal_7]</td>
<td>$p[cal_8]</td>
<td>$p[prom_4]</td>
<td>$p[mat_5]</td>
<td>$p[cal_9]</td>
<td>$p[cal_10]</td>
<td>$p[prom_5]</td>
<td>$p[mat_6]</td>
<td>$p[cal_11]</td>
<td>$p[cal_12]</td>
<td>$p[prom_6]</td>
<td>$p[mat_7]</td>
<td>$p[cal_13]</td>
<td>$p[cal_14]</td>
<td>$p[prom_7]</td>
<td>$p[mat_8]</td>
<td>$p[cal_15]</td>
<td>$p[cal_16]</td>
<td>$p[prom_8]</td>
<td>$p[mat_9]</td>
<td>$p[cal_17]</td>
<td>$p[cal_18]</td>
<td>$p[prom_9]</td>
<td>$p[mat_10]</td>
<td>$p[cal_19]</td>
<td>$p[cal_20]</td>
<td>$p[prom_10]</td>
<td>$p[prom_gral]</td>
</tr>
</table>
</BODY>
</HTML>
");


$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf"); }
?>