Ver Mensaje Individual
  #2 (permalink)  
Antiguo 07/03/2005, 18:25
Avatar de christopher1979
christopher1979
 
Fecha de Ingreso: octubre-2004
Mensajes: 203
Antigüedad: 19 años, 6 meses
Puntos: 0
Exclamación yo veo esto

Cita:
Iniciado por infoportal
tengo el siguiente codigo para articulos de mi web

el problema lo tengo hace varias semanas cuando trato de editar el codigo para otra pagina web me da un error en la linea
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\RedFaro\ver.php on line 126

el codigo es el siguiente
<?



$conn = mysql_connect("localhost","root","1234");



mysql_select_db("base de datos");



$q = mysql_query("SELECT id, titulo, resumen, Noticia, imagen FROM articulos WHERE id=$id");



$res = mysql_fetch_row($q);



$poema = split("\n",$res[3]);



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&oacute;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);



?>

aqui veo algo talves no sea pero intentalo


[php]

$res = mysql_fetch_row($q)[COLOR=Sienna]{//y cuando termines tiene que cerrar

target=\"_blank\">$res[7]</a></td> }

ojala que te sirva

Última edición por christopher1979; 07/03/2005 a las 18:27