Ver Mensaje Individual
  #6 (permalink)  
Antiguo 26/07/2012, 14:50
Avatar de jotaincubus
jotaincubus
 
Fecha de Ingreso: mayo-2005
Ubicación: Medellin - Colombia
Mensajes: 1.797
Antigüedad: 19 años
Puntos: 394
Respuesta: Condicionar valores en una tabla php mysql

El código enviado es un ejemplo... echo no necesita paréntesis... no se para que almacenar los datos en variables... intente con este código para ver si le funciona:

Código PHP:
Ver original
  1. while ($row = mysql_fetch_array($consulta))
  2. {  
  3.   echo "<tr>\n";
  4.   echo "<td width='10%'>" . $row["equipo"] . "</td>\n";
  5.   echo "<td width='40%'>" . $row["nombre"] . "</td>\n";
  6.   echo "<td width='10%'>" . $row["cod_m"] . "</td>\n";
  7.   echo "<td width='5%'>" . $row["cant_ins"] . "</td>\n";
  8.   echo "<td width='5%'>" . $row["total"] . "</td>\n";
  9.   echo "<td width='10%'>" . $row["cod_p"] . "</td>\n";
  10.   echo "<td width='10%'>" . (($row["total"] * 10/100) >= $row["cant_ins"]) ? 'SUFICUENTES PRODUCTOS' : 'SOLICITAR MAS PRODUCTOS' . "</td>\n";
  11.   echo "</tr>";
  12.  }
__________________
Por que existe gente que no agradece después de que se le ha brindado tiempo y ayuda ???