accessing BLOB from mysql db

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mir nazim

    accessing BLOB from mysql db

    hi, i m facing a problem in properly accesing BLOBs from mysql db.
    when i display an image stored in the blob field it show some absurd
    characters.
    i think it is the problem of properly telling browser the mime type of
    image of blob field.
    that is exactly what my problem is. i do not know how to do that .
    any help is appreciated.
  • Sashi

    #2
    Re: accessing BLOB from mysql db

    mir nazim wrote:
    [color=blue]
    > hi, i m facing a problem in properly accesing BLOBs from mysql db.
    > when i display an image stored in the blob field it show some absurd
    > characters.
    > i think it is the problem of properly telling browser the mime type of
    > image of blob field.
    > that is exactly what my problem is. i do not know how to do that .
    > any help is appreciated.[/color]
    maybe you should try sendig a header to the browser:

    <?php
    header ("Content-type: image/jpeg");
    echo "<img src=\"blobparse r.php?imgid=323 2\">";
    ?>


    or whatever the image is like image/png || image/gif
    --
    Sashi

    Comment

    • Andy Hassall

      #3
      Re: accessing BLOB from mysql db

      On 15 Mar 2004 03:49:02 -0800, mir4uu@yahoo.co m (mir nazim) wrote:
      [color=blue]
      >hi, i m facing a problem in properly accesing BLOBs from mysql db.
      >when i display an image stored in the blob field it show some absurd
      >characters.
      >
      >i think it is the problem of properly telling browser the mime type of
      >image of blob field.[/color]

      Probably.
      [color=blue]
      >that is exactly what my problem is. i do not know how to do that .
      >any help is appreciated.[/color]

      header("Content-type: appropriate value goes here");

      --
      Andy Hassall <andy@andyh.co. uk> / Space: disk usage analysis tool
      <http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>

      Comment

      • mir nazim

        #4
        Re: accessing BLOB from mysql db

        > maybe you should try sendig a header to the browser:[color=blue]
        >
        > <?php
        > header ("Content-type: image/jpeg");
        > echo "<img src=\"blobparse r.php?imgid=323 2\">";
        > ?>
        >
        >
        > or whatever the image is like image/png || image/gif[/color]
        actually image will come from the data base
        like

        $result=mysql_q uery("SELECT * FROM users");
        $row=mysql_fetc h_assoc($result );
        echo $row['photo'];

        do get now guys
        please help. i m in a fix

        Comment

        • mir nazim

          #5
          Re: accessing BLOB from mysql db

          mir4uu@yahoo.co m (mir nazim) wrote in message news:<425cc8d1. 0403152133.5c22 b4f9@posting.go ogle.com>...[color=blue][color=green]
          > > maybe you should try sendig a header to the browser:
          > >
          > > <?php
          > > header ("Content-type: image/jpeg");
          > > echo "<img src=\"blobparse r.php?imgid=323 2\">";
          > > ?>
          > >
          > >
          > > or whatever the image is like image/png || image/gif[/color]
          > actually image will come from the data base
          > like
          >
          > $result=mysql_q uery("SELECT * FROM users");
          > $row=mysql_fetc h_assoc($result );
          > echo $row['photo'];
          >
          > do get now guys
          > please help. i m in a fix[/color]

          please help me guys i m depparate

          Comment

          Working...