estimados tengo un codigo que muestra los articulos completos ver.php
el tema es que no me muestra resultados
<?
$conn = mysql_connect("localhost","root","root");
mysql_select_db("basededatos");
$q = mysql_query("SELECT id, cabezera, titulo, breve_texto, Noticia, imagen, fecha, url FROM articulos WHERE id=$id");
$res = mysql_fetch_row($q);
$poema = split("\n",$res[4]);
echo "<table width=\"100%\" height=\"145\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td height=0 valign=\"top\" bgcolor=\"#0269AD\"> <div align=\"center\"><font color=\"#FFCC00\" size=\"5\"><strong>$res[1]</strong></font><img src=\"$res[4]\" border=\"0\" align=\"right\"></div></td>
</tr>
<tr>
<td height=\"0\" valign=\"top\" bgcolor=\"#005088\"> <div align=\"center\"><font color=\"#FFCC00\" size=\"5\"></font></div></td>
</tr>
<tr>
<td height=\"0\" valign=\"top\" bgcolor=\"#0000FF\"> <p><strong><font color=\"#FFFFFF\">$res[2]</font></strong></p></td>
</tr>
<tr>
<td height=\"0\" valign=\"top\" bgcolor=\"#0099FF\"> <p align=\"right\"><font color=\"#FFFFFF\"><em>Fecha
de publicación: $res[6]</em></font></p></td>
</tr>
<tr>
<td height=\"0\" valign=\"top\"> <p>$poema[$i]"; for($i=0;$i<count($poema);$i++)
echo "<font class=\"content\">$poema[$i]</font><br>
";
echo "</p></td>
</tr>
<tr>
<td height=\"0\" valign=\"top\" bgcolor=\"#666666\"><strong>Autor:</strong>
$res[5]<br>
<strong>Sitio Relacionado:</strong> <a href=\"$res[7]\" target=\"_blank\">$res[7]</a></td>
</tr>
</table>";
mysql_close($conn);
?>
el error es en la linea 25 :Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource.
La linea 25: seria: $res = mysql_fetch_row($q);