Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/04/2009, 08:23
Pelao
 
Fecha de Ingreso: abril-2003
Mensajes: 260
Antigüedad: 21 años
Puntos: 1
error mysql_fetch_array()

Alguien sabe donde esta mi error en este codigo? no lo entiendo.

Código PHP:
<?php   require("configuracion.php");  
if(!empty(
$_POST['seleccion'])) {
$aLista=$_POST['seleccion'];

$q2=mysql_query("SELECT id, SUM(valor) AS total FROM informes where id IN (".implode(',',$aLista).")"); while($row mysql_fetch_array($q2)) {echo "".$row["total"]."" ;  }   mysql_free_result($q2);}?>
Me dice:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in...

Gracias a todos
__________________
Bye!