Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/04/2009, 12:56
Avatar de rompeguesos
rompeguesos
 
Fecha de Ingreso: marzo-2009
Mensajes: 692
Antigüedad: 15 años, 1 mes
Puntos: 8
Pregunta error: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result re

Hola tengo un codigo que lo que hace es mostrar una noticia recogida de la pagina que muestra todas las noticias, la pagina que me da ese error es mas.php y el codigo es el siguiente:

Código PHP:
<?php  

include("../reg/config.php"); 

if(isset(
$_GET['not_ID'])){      
    
$not_ID $_GET['not_ID'];  
    
$sqlQueryNot mysql_query("SELECT * FROM noticias WHERE not_ID='$not_ID'"$db_link) or die(mysql_error); 

$rowNot mysql_fetch_array($sqlQueryNot);{ 
    echo 
"<h2>".$rowNot['titulo']."</h2>";  
    echo 
$rowNot['texto']; 
    }  

?>
la pagina desde la que se llega al mas.php es vertodas.php y es el siguiente codigo:

Código PHP:
<?php
session_start
();

include(
"../reg/config.php");

// armamos la consulta
$sqlQueryNot mysql_query("SELECT not_ID, titulo, texto, email, f_alta, imagen FROM noticias"$db_link)
or die(
mysql_error());
// mostramos las noticias,
// otra vez usando un bucle while
while($rowNot mysql_fetch_array($sqlQueryNot)){
echo 
"<h1>$rowNot[titulo]</h1>";
echo 
"Noticia enviada por: ".$rowNot['email']." Fecha: ".$rowNot['f_alta']."<br/><br/>";
echo 
nl2br($rowNot['texto'])."<br/><br/>";
echo 
"<img src=\"imagenes/".$rowNot['imagen']."\" width=\"100\" height=\"100\" alt=\"Descripcion\" />";
echo 
"<a href=\"mas.php?not_id=".$rowNot['not_ID']."\" target=\"_blank\">Más</a>";
}
?>
que hago mal?

El error es este:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /mnt/web7/32/27/51920027/htdocs/coriaweb/usuarios/noticias/mas.php on line 9

Última edición por rompeguesos; 29/04/2009 a las 12:58 Razón: Se me olvido indicar el error :D