Re: Error mysql

From: Date: Fri, 29 Aug 2003 23:53:01 +0000
Subject: Re: Error mysql
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-39968@lists.php.net to get a copy of this message
El error se debe a que el query que le enviaste al server no es valido, lo que tendrias que hacer es probarlo desde la consola del mysql para ver que error esta tirando, saludos, Pablo ----- Original Message ----- From: "Amador Cubino [Necostek.com]" <acubino3@necostek.com> To: <lista@phpes.com> Sent: Friday, August 29, 2003 7:07 PM Subject: [PHP-ES] Error mysql Hola, el siguiente codigo $fecha1 = "25-08-2003"; $fecha2 = "30-08-2003"; $resultado= mysql_query("select Usuarios.url, avg(publi_stats_real.visitas) from Usuarios, publi_stats_real where Usuarios.id = publi_stats_real.idweb and publi_stats_real.fecha > '$fecha1' and publi_stats_real.fecha < '$fecha2'",$conexion); while ($registro = mysql_fetch_array($resultado)){ $user= $registro['url']; $visitas = $registro['visitas']; echo " $user - $visitas visitas <br>"; } me da este error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/cubino/public_html/hispanel/panelad-estadisticas.php on line 22 Yo lo que intento es hacer una media las visitas de los ultimos 5 dias por web. A ver si alguien puede ayudarme ************************************************* D. Amador Cubino Presidente de Necostek y asociadas ************************************************* http://www.NECOSTEK.com - Imagen Comercial http://www.HISPADOMINIO.com - Hosting Gratis http://www.DISENTWEB.COM - Hosting y Diseño web *************************************************

« previous php.general.es (#39968) next »