Esto:
Código PHP:
$informacion = conexion("SELECT * FROM mensajes WHERE destinatario = '$usuario'");
$resultado=mysql_query($informacion) or die (mysql_error());
while( $datos = mysql_fetch_array($resultado,MYSQL_ASSOC)){
echo "<div id=\"mensaje\">";
echo "<p><b>Remitente:</b> ".$datos['remitente']."</p>";
echo "<p><b>Fecha:</b> ".$datos['fecha']."</p>";
echo "<p><b>Asunto:</b> ".$datos['asunto']."</p>";
echo "<p><b>Contenido:</b> ".$datos['mensaje']."</p>";
echo "</div>";
}
Me devuelve el siguiente error:
Código:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #8' at line 1
No sé ni de donde sale 'Resource id #8' :S