Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/05/2015, 10:17
Avatar de el_cesar
el_cesar
 
Fecha de Ingreso: mayo-2001
Ubicación: Cali
Mensajes: 2.423
Antigüedad: 23 años, 10 meses
Puntos: 20
Respuesta: Error contando filas

la solución fué cambiar la manera como estaba pensando la consulta, es decir no traer todo el array sino mas bien recorrerlo con la consulta, mi script quedó así y funciona bien

Código PHP:
Ver original
  1. $cons0="SELECT * FROM Eventuales";
  2. $rcons0 = mysql_query($cons0);
  3. echo "<table width='50%' align='center'><td><img src='logo_jpg.png' width='150' height='150' /></td>
  4.         <td><h1>Eventuales Disponibles</h1></table>";
  5. echo "<table width='50%' align='center'>
  6.         <tr class='titab'><td>Nombre</td><td>Estado</td>";
  7. while ($lis = mysql_fetch_array($rcons0)){
  8.     $idev = $lis['Id_eventual'];
  9.     $nomev = $lis['Nombre'];
  10.     $ceve="SELECT * FROM Evento WHERE Fecha_fin <= '$fecha_inicio' AND id_eventual = '$idev'";
  11.     $rceve = mysql_query($ceve);
  12.    
  13.     $cuenta = mysql_num_rows($rceve);
  14.    
  15.     if($cuenta == '0') {
  16.         echo "<tr><td>".$nomev."</td>";
  17.         echo "<td>Asignar</td></tr>";
  18.     }else
  19.     {
  20.         echo "<tr><td>".$nomev."</td>";
  21.         echo "<td>No esta Disponible</td></tr>";
  22.     }
  23. }

Gracias por la ayuda
__________________
Say no more.......