Código PHP:
Ver original
<?php $datos="select NomEntCom,TblEntCom.CveEntCom, CVeCtrEsc,CveEntGpo, TblPerCom.NivPerCom,FchEntCom, count(*) from TblOrgCom, TblPerCom, TblEntCom left join TblComInt on TblEntCom.CveEntCom=TblComInt.CveEntCom where TblComInt.CveEntPrf=3 and TblOrgCom.PlnEstCom='Licenciatura en Informática Administrativa' and TblEntCom.CveEntCom=TblOrgCom.CveEntCom and TblEntCom.CveEntCom=TblPerCom.CveEntCom group by TblEntCom.CveEntCom order by TblPerCom.NivPerCom"; $i=0; $NombreMateria[$i] = $registro ['NomEntCom']; $ClaveMateria[$i] = $registro ['CveEntCom']; $NivelMateria[$i] = $registro ['NivPerCom']; $FechaMateria[$i] = $registro ['FchEntCom']; $ContRegistros[$i] = $registro ['count(*)']; $ClvControl[$i] = $registro ['CVeCtrEsc']; $ClaveGrupo[$i] = $registro ['CveEntGpo']; $Plantel[$i] = $registro ['PlnEstCom']; $i++; } for($j=0;$j<=$total1;$j++) { ?> <?php if($per[$j]!=0) { ?> <tr> <td align="center"><?php echo $per[$j]; ?></td> <td align="center"><?php echo $NivelMateria[$j]; ?></td> <td align="center"><span style="cursor:pointer;" onclick="prueba(<?php echo $ClaveMateria[$j]?>); "><?php echo $ContRegistros[$j];?></span></td> </tr>
lo que me genera es una tabla con esto:
Promocion PEriodo Alumno
2010A 2 22
2010A 2 20
2010A 2 16
2010A 3 22
2010A 3 12
2010A 4 10
y nesesito que solo mande
Promocion PEriodo Alumno
2010A 2 58
2010A 3 34
2010A 4 10 alumnos se suman ..