No hay caso...
Se puede tener dos select en la misma página? Quizás ahí está el error... igualmente, están separados.
Les muestro.
Aquí llamo a la noticia (que está en una tabla llamada mensaje):
Código PHP:
<?php
require("conexion.php");
$noticia_id = intval($_GET['codigo']);
$sql = "SELECT * FROM mensaje WHERE cod_mensaje = $noticia_id";
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($res);
echo "<table width=600 border=0 align=center cellpadding=3 cellspacing=4 bgcolor=#000000>";
do {
echo "<tr>";
echo "<td><table width=100% border₧0 cellspacing=3 cellpadding=2>";
echo "<tr>";
echo "<td><table width=100% border=0 cellspacing=2 cellpadding=1>";
echo "<tr>";
echo "<td><div class=Estilo8>".$row['titulo']."<div></td>";
echo "</tr>";
echo "<tr>";
echo "<td><div class=Estilo10>Por ".$row['persona']." - ".$row['fecha']."<div></td>";
echo "</tr>";
echo "<tr>";
echo "<td height=5><div class=Estilo7><div></td>";
echo "</tr>";
echo "<tr>";
echo "<td><div class=Estilo7>".$row['fotonota']."<div></td>";
echo "</tr>";
echo "<tr>";
echo "<td height=5><div class=Estilo7><div></td>";
echo "</tr>";
echo "<tr>";
echo "<td><div class=Estilo7>".$row['mensa']."<div></td>";
echo "</tr>";
echo "</table></td>";
echo "</tr>";
echo "<tr>";
echo "<td height=20 background=separador.png> </td>";
echo "</tr>";
echo "</table></td>";
echo "</tr>";
} while($row = mysql_fetch_assoc($res));
echo "</table>";
?>
Y abajo intento poner los comentarios (en la tabla llamado comen), pero no hay manera que me los muestre. Puse así ahora:
Código PHP:
<?php
require("conexion.php");
$query=mysql_query("select * from comen where codigo='$codigo' ",$connection);
$array=mysql_fetch_array($query);
echo $array['mensaje'];
?>
Pero no anda... perdonen por romper tanto la paciencia, pero no encuentro la forma.
Abrazos.