Hola amigos que tal estoy trabajando con un libro de visitas pero tengo este problema cuando ya pasan los 20 registros aparece la palabra ver más pero cuando le doy clic me da este warning y no me muestra los datos
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in C:\Apache\xampp\htdocs\webs\prueba\visitas\index.p hp on line 51
la Linea 51 es esta while (($damefila=mysql_fetch_object($resultid)) && ($num_filas<10))
Y este es mi codigo
Código PHP:
//muestro los datos en un bucle
$num_filas = 0;
while (($damefila=mysql_fetch_object($resultid)) && ($num_filas<10))
{
?>
<table align="center" width="100%" cellspacing="2" cellpadding="0" border="0">
<tr>
<td valign="top" class=fuente8><b>
<? //si el visitante no introdujo nombre muestro como nombre "Anónimo"
if ($damefila->nombre == "-"){
echo "Anónimo";
}elseif ($damefila->email != "-") {
echo '<a href="mailto:' . $damefila->email . '">' . $damefila->nombre . '</a>';
}else{
echo $damefila->nombre;
}
?></b>:<br>
</td></tr>
<tr><td bgcolor=cccccc colspan="2"><img src="images/pixeltrans.gif" width=1 height=1 border="0"></td></tr>
<td class=fuente8 valign="top">
<?echo strip_tags($damefila->comentario)?>
<td valign="top" align="right" nowrap class=fuente8>
Valoracion: <?echo $damefila->valoracion?>
</td>
</tr>
</table>
<table width="370" border="0" align="center">
<tr>
<td width="197"><span class="fuente8">Fecha de Registro <?echo $damefila->fecha?></span></td>
<td width="163"><span class="fuente8">Hora de Registro <?echo $damefila->hora?></span></td>
</tr>
</table>
<br>
<?
$num_filas++;
} //termina el bucle while
//si quedan más valoraciones en el conjunto de resultados, muestro el enlace de "Ver más"
if ($damefila)
echo "<div align=center><b><a href=\"index.php?vermas=$damefila->id_librovisitas_php\">Ver más mensajes</a></b></div><br>";
Mas abajo hay mas codigo pero no tiene nada que ver con esto gracias a todos