Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/04/2010, 12:56
sharlymart
 
Fecha de Ingreso: abril-2010
Ubicación: Mexico
Mensajes: 35
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: como juntar campos con php ?

hola hidek1 buen dia..

ya los llame con php y ya salen en mi pagina pero no se como sumarlos con php mira este es mi codigo y este es el link de mi pagina espero puedas chekarlo y decirme como hecerlo porfavor ....

Código PHP:
Ver original
  1. <?php
  2. $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";
  3. $result = mysql_query($datos) or die(mysql_error());
  4. $i=0;
  5.  while ($registro = mysql_fetch_array($result)){
  6.  
  7.  $NombreMateria[$i] = $registro ['NomEntCom'];
  8.  $ClaveMateria[$i] = $registro ['CveEntCom'];
  9.  $NivelMateria[$i] = $registro ['NivPerCom'];
  10.  $FechaMateria[$i] = $registro ['FchEntCom'];
  11.  $ContRegistros[$i] = $registro ['count(*)'];
  12.  $ClvControl[$i] = $registro ['CVeCtrEsc'];
  13.  $ClaveGrupo[$i] = $registro ['CveEntGpo'];
  14.  $Plantel[$i] = $registro ['PlnEstCom'];
  15.  list($cve[$i], $per[$i]) = explode("-", $ClvControl[$i]);
  16.  $i++;
  17.  
  18. }
  19. $total1=count($NombreMateria);
  20. for($j=0;$j<=$total1;$j++)
  21.  
  22. {
  23. ?>
  24.  
  25.   <?php
  26.   if($NivelMateria[$j]!=0 && $per[$j]!=0)
  27.   {
  28.   ?>
  29.   <tr>
  30.   <td align="center"><?php echo $per[$j]; ?></td>
  31.   <td align="center"><?php echo $NivelMateria[$j]; ?></td>
  32.  
  33.     <td  align="center"><span style="cursor:pointer;" onclick="prueba(<?php echo $ClaveMateria[$j]?>); "><?php echo $ContRegistros[$j];?></span></td>
  34. </tr>
  35.  
  36. <?php
  37. }
  38.  
  39. }
  40. ?>


http://seduca.uaemex.mx/eru/reporte_k8.php