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'];
}
?>
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>";
}
?>
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