Does anybody have any experience in displaying images stored in
I'm trying to export image into file using pg_lo_export function and
then view it on html page. However, the pg_lo_export seem to work only
The code is like this:
(php5, postgresql 8.2)
$no++; //Incerementing number of the image
$query = "select pic_data, accurateness_level, mime_type from image2 where
$row = pg_fetch_row(pg_query($query));
// Get the image OID
$image = $row;
// Get the type of the picture
$type = $row;
// Export the picture into pic.type
//get image file dimensions
$dimensions = getimagesize("pic$no.$type");
$width = $dimensions;
$height = $dimensions;
// Show the picture
echo "<img src=\"pic$no.$type\" width=" . $width . " height=" .
$height . "/>";
I understand that the script doesn't like the idea of saving files on
the server. However, why does it work at all?
Are there any other ways to export images from the database?
Any comments are welcome.
pgsql-php by date
|Next:||From: Dave Page||Date: 2007-06-13 09:09:21|
|Subject: Re: php, postgresql and graphical images|
|Previous:||From: Ray Garrison||Date: 2007-06-08 17:17:05|
|Subject: Re: Application Design: Where to implement historical revisions of objects|