Foros del Web » Programando para Internet » PHP »

Problema con while ($row = mysql_fetch_array($result))

Estas en el tema de Problema con while ($row = mysql_fetch_array($result)) en el foro de PHP en Foros del Web. Hola que tal Tengo el siguiente inconveniente con la sentencia Código: while ($row = mysql_fetch_array($result)), Me da el siguiente error Warning: mysql_fetch_array(): supplied argument is ...
  #1 (permalink)  
Antiguo 10/11/2009, 18:25
 
Fecha de Ingreso: octubre-2006
Ubicación: Valparaiso Chile
Mensajes: 228
Antigüedad: 17 años, 6 meses
Puntos: 0
Problema con while ($row = mysql_fetch_array($result))

Hola que tal

Tengo el siguiente inconveniente con la sentencia
Código:
while ($row = mysql_fetch_array($result)),
Me da el siguiente error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mipesoid/public_html/mip/includes/ver_descarga.php on line 29.

La linea 29 es el WHILE, lo raro es que en Localhost, no me da el error, dejo el código que estoy utilizando.

Código:
<?
        $sql = " SELECT id_download,nombre_file,contar_download FROM download";
        $result = mysql_query($sql);
?>
        <table>
                <th>Nombre Archivo</th>
                <th>Descargar</th>
                <th>Estadística</th>
                <tr />
                <?
                while ($row = mysql_fetch_array($result))
                {
                        echo "<td>", "$row[1]","</td>";
                        echo "<td>", "<form name='descarga' action='contar_descarga.php' method='post'>",
                        "<input  type=submit value='Download'>" ,"</td>";
                        echo "<td>", "$row[2]"," Descargas ", "</td>";
                }
                ?>
        </table>
        <?
Cualquier ayuda es bienvenida.

Un Cordial saludo
__________________
Un Cordial Saludo
Claudio González Soto
Negocios Online
http;//www.servpcweb.com
  #2 (permalink)  
Antiguo 10/11/2009, 18:29
Avatar de zaetoner  
Fecha de Ingreso: noviembre-2007
Ubicación: La ciudad de México
Mensajes: 607
Antigüedad: 16 años, 5 meses
Puntos: 30
Respuesta: Problema con while ($row = mysql_fetch_array($result))

es muy posible que la base de datos no la hayas hecho igual que en el server de pruebas
__________________
...
  #3 (permalink)  
Antiguo 10/11/2009, 18:39
 
Fecha de Ingreso: octubre-2006
Ubicación: Valparaiso Chile
Mensajes: 228
Antigüedad: 17 años, 6 meses
Puntos: 0
Respuesta: Problema con while ($row = mysql_fetch_array($result))

Disculpas a todos, tenias razón, habia una letra cambiada, todo ok
__________________
Un Cordial Saludo
Claudio González Soto
Negocios Online
http;//www.servpcweb.com
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:59.