Ver Mensaje Individual
  #23 (permalink)  
Antiguo 19/06/2007, 10:39
Doom_Lady
 
Fecha de Ingreso: junio-2007
Mensajes: 37
Antigüedad: 16 años, 11 meses
Puntos: 0
Re: necesito ayuda con el nuevo diseño de mi web

veamos, he hecho lo que me has dicho, y me sale esto:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/dylanmcz/impressivemadonna.com/noticiass1.php on line 16

NO SE ENCONTRARON RESULTADOS VALIDOS

este es el código que tengo ahora:

<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
//conectamos a la base de datos
include ("conexion.php");
//generamos nuestra consulta

$sql = mysql_query(" SELECT * from tb_noticias "
." WHERE fecha > (CURDATE() - INTERVAL 7 DAY) AND fecha <= CURDATE() "
." ORDER BY fecha DESC, id_noticia DESC ");
$num=mysql_num_rows ($resultado);
$orden=0;
if ($num == 0)
{
echo "<center>NO SE ENCONTRARON RESULTADOS VALIDOS</center>";
}
else
{
while ($row=mysql_fetch_array($resultado))
{
?>
<table width="520" border="1" bordercolor="#6B8198" bgcolor="#526375">
<tr>
<td width="520"><table width="514" border="0" align="center">
<tr>
<td width="68" height="55" background="pruebaphp2/noticiasicon.jpg">&nbsp;</td>
<td width="372"><?php
echo "$row[fecha]";
?>
</td>
<td width="52"background="pruebaphp/noticiasmicro.jpg">&nbsp;</td>
</tr>
</table>
<table width="513" border="0" align="center">
<tr>
<td background="pruebaphp2/noticiastitulo.jpg"><div align="center"> <?php
echo "$row[titulo]";
?>
</div></td>
</tr>
</table>
<?php
echo "$row[noticia]";
?></td>
</tr>
</table>
</br>
</br>
<?php
//cerramos el while y el else...
}
}
?>
</body>
</html>

aqui está colgado: www punto impressivemadonna punto com/noticiass1.php

se supone que debería salir no? he cambiado el nombre del archivo de conexión por el que tengo, que se llama conexion.php, no sé que puede fallar...