Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/07/2012, 00:59
helion
 
Fecha de Ingreso: mayo-2010
Mensajes: 215
Antigüedad: 14 años
Puntos: 4
Pregunta Sumar en grupo php

BUENAS AMIGOS VERAN, TENGO ESTE CODIGO DE ACA

Código PHP:
<?PHP $qmnews = @mysql_query("SELECT * FROM `GROUP` order by GROUP.Id DESC LIMIT $limit1,10");
while(
$data mysql_fetch_array($qmnews)){ ?>
SIRVE PARA PODER VER LA LISTA DE LOS GRUPOS CREADOS EN ESA TABLA

EJEMPLO DE LISTA DE GRUPOS

GRUPOA = 5 USUARIOS
GRUPOB = 10 USUARIOS

DENTRO DE LA TABLA CADA USUARIO TIENE UNA COLUMNA LLAMADA "PUNTOS"

COMO PUEDO SUMAR LOS PUNTOS DE TODOS LOS USUARIOS INTEGRADOS EN EL GRUPO Y QUE SALGAN EN LA LISTA.. ?




LOQUE ESTOY HACIENDO ES ESTO


Código PHP:
<table width="265" border="1">
  <tr>
    <td width="104">
    <?=$data[group?></td>
    <td width="145"><?=$data[puntos?></td>
  </tr>
</table>

pero donde dice <?=$data[puntos] ?> no suma solo me da los puntos del 1er usuario sin sumar con los otros puntos de los demas usuarios...
ayudenme porfavor.