Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/07/2010, 05:50
josico
 
Fecha de Ingreso: julio-2009
Mensajes: 172
Antigüedad: 14 años, 10 meses
Puntos: 3
error con mysql fetch array

Hola

He creado la siguiente página con el siguiente código y me da este error.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Users\jose\Desktop\ZMWS\_web.zmwsc\e107\pagina. php on line 26

En la página he programado esto:

********************************************

line 10 = require_once("e107_config.php"); // Aquí estan las variables de conexión a la base de datos
line 11 = define("SERVIDOR", $mySQLserver);
line 12 = define("USUARIO", $mySQLuser);
line 13 = define("PASS", $mySQLpassword);
line 14 = define("BASEDEDATOS", $mySQLdefaultbd);
line 15 = define("PREFIJOBD", $mySQLprefix);

line 17 = $CONEXION=mysql_connect("".SERVIDOR."","".USUARIO. "","".PASS."");
line 18 = $BD="".BASEDEDATOS."";
line 19 = $SQL_PAGINA="select * from ".PREFIJOBD."articulo order by id_articulo desc";

line 21 = $RES_PAGINA=mysql_db_query($BD,$SQL_PAGINA,$CONEXI ON); // Aquí conexion aparece separada, pero parece cosa del foro

line 26 = while ($REG_PAGINA=mysql_fetch_array($RES_PAGINA)) // Here is the bug
line 27 = {
line 28 = echo $REG_PAGINA["titulo_articulo"];
line 29 = }

*******************************************

He intentado documentarme pero no encuentro información al respecto.
Fijarse que el error me lo da en la linea 26 con el while