🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #3227

Problemas con Php, sql e imagenes

#3227
From: Compro Varios
Date: Mon, 18 Apr 2005 10:54
187 lines
6356 bytes
This is a multi-part message in MIME format.

------=_NextPart_000_0081_01C54415.B6E0E080
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0082_01C54415.B6E0E080"


------=_NextPart_001_0082_01C54415.B6E0E080
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Alguien me podria ayudar por favor con el siguiente error que me manda =
la base de datos cuando quiero mostrar las imagenes que estan guardadas =
en un campo blob.
El error que me envia la base de datos cuando quiero mostrar la imagen =
es el siguiente

"Warning: mysql_result() [function.mysql-result]: Unable to jump to row =
0 on MySQL result index 9 "

Adjunto codigo fuente.=20

------=_NextPart_001_0082_01C54415.B6E0E080
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Alguien me podria ayudar por favor con =
el siguiente=20
error que me manda la base de datos cuando quiero mostrar las imagenes =
que estan=20
guardadas en un campo blob.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>El error que me envia la base de datos =
cuando=20
quiero mostrar la imagen es el siguiente</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>"Warning: mysql_result() =
[function.mysql-result]:=20
Unable to jump to row 0 on MySQL result index 9 "</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2>Adjunto codigo=20
fuente. </FONT></DIV></BODY></HTML>

------=_NextPart_001_0082_01C54415.B6E0E080--

------=_NextPart_000_0081_01C54415.B6E0E080
Content-Type: application/octet-stream;
	name="reportaje2.php"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="reportaje2.php"

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3D"Content-Language" content=3D"es">
<meta name=3D"GENERATOR" content=3D"Microsoft FrontPage 5.0">
<meta name=3D"ProgId" content=3D"FrontPage.Editor.Document">
<meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dwindows-1252">
<title>Reportajes...</title>


<style type=3D"text/css">
<!--
body
{
scrollbar-base-color: #000000;
scrollbar-arrow-color: black;
scrollbar-darkshadow-color: #000000;
scrollbar-track-color: white;
scrollbar-face-color: #7f99b2;
scrollbar-highlight-color: #000000;
scrollbar-shadow-color: #7f99b2;
scrollbar-3dlight-color:#336699;
}
--> <?/* <style>{  }
BODY {
	  scrollbar-face-color: blue ;
	  scrollbar-shadow-color: white;
	  scrollbar-highlight-color: silver ;
	  scrollbar-3dlight-color: blue ;
	  scrollbar-darkshadow-color: white;

	  scrollbar-arrow-color: white;
     }
-->
*/?>  </style>
</head>

<body link=3D"#000000" vlink=3D"#000000" alink=3D"#000000">

<?
      require("conexion.php");
$idrep=3D$_POST['pasa'];



    $result1=3Dmysql_query("SELECT * FROM entrevista", $conexion)or =
die(mysql_error());
    $result2=3Dmysql_query("SELECT * FROM noticia", $conexion)or =
die(mysql_error());
 =20
    $row1=3Dmysql_fetch_array($result1);
    $row2=3Dmysql_fetch_array($result2);

 $qry =3D "SELECT tipo, contenido FROM reportaje WHERE =
id=3D$id_reportaje";
 $res =3D mysql_query($qry);
 $tipo =3D mysql_result($res, 0, "tipo");
 $contenido =3D mysql_result($res, 0, "contenido");

 header("Content-type: $tipo");
 print $contenido;
?>

?>
<hr>
<table border=3D"0" cellpadding=3D"0" cellspacing=3D"0" =
style=3D"border-collapse: collapse" bordercolor=3D"#111111" =
width=3D"100%" height=3D"507">
  <tr>
    <td height=3D"31" colspan=3D"3"><p align=3D"right">
        <?=3D$res[dia_rep]?>
        /
        <?=3D$res[mes_rep]?>
        /
        <?=3D$res[ano_rep]?>
      </p>
    </td>
  </tr>
  <tr>
    <td height=3D"57" colspan=3D"3"><font size=3D"4" color=3D"#FF0000">
      <?=3D$res[titulo_reportaje]?>
    </font><hr></td>
  </tr>
  <tr>
    <td width=3D"70%" height=3D"410" rowspan=3D"6"><font size=3D"2" =
color=3D"#000000">
      <?=3D$res[cont_reportaje]?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
</font> </td>
    <td width=3D"3%" rowspan=3D"6" height=3D"410">&nbsp;</td>
    <td width=3D"27%" height=3D"29">&nbsp;</td>
  </tr>
  <tr>
    <td height=3D"148"><img src=3D"imagenes/prueba/prueba.jpg" =
width=3D"200" height=3D"133"></td>
  </tr>
  <tr>
    <td height=3D"20">&nbsp;</td>
  </tr>
  <tr>
  <td height=3D"149"> <?
  /*Header( "Content-type: $type");
   $row[contenido]
      $tipo =3D mysql_result($row, $id, "tipo");
 $contenido =3D mysql_result($row, $id, "contenido");
                  */
  </td>
  </tr>
  <tr>
    <td height=3D"78">&nbsp;</td>
  </tr>
</table>
<hr>

<p align=3D"center"><a =
href=3D"javascript:history.back();"><b>Volver</b></a></p>

</body>

</html>

------=_NextPart_000_0081_01C54415.B6E0E080--
Technical Details
Message-ID: <4263e63c_1@nova.entelchile.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nova.entelchile.net

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,e9daa9226d7f7b8b,start
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
From: "Compro Varios" <nomail@nomail.com>
Newsgroups: chile.comp.programacion
Subject: Problemas con Php, sql e imagenes
Date: Mon, 18 Apr 2005 12:54:10 +0200
Lines: 188
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="----=_NextPart_000_0081_01C54415.B6E0E080"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 200.72.197.139
X-Original-NNTP-Posting-Host: 200.72.197.139
Message-ID: <4263e63c_1@nova.entelchile.net>
X-Trace: nova.entelchile.net 1113843260 200.72.197.139 (18 Apr 2005 12:54:20 -0400)
X-Original-NNTP-Posting-Host: 200.72.197.139
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newscon02.news.prodigy.com!prodigy.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nova.entelchile.net