ID:               50467
 Updated by:       [email protected]
 Reported By:      businessitconsulting at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: Linux
 PHP Version:      5.3.1
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




Previous Comments:
------------------------------------------------------------------------

[2009-12-13 19:59:43] businessitconsulting at yahoo dot com

Description:
------------
Need to display multiple images stored as BLOB data types in a MySQL
table. Using a while loop, other fields in the same table with text data
type, displays in a browser showing all rows when the BLOB field is not
included.

The BLOB data (the images), often are displayed as binary data but
needs to show as actual images.

Apparently there is an issue with PHP with displaying the binary data
stored in a variable directly as an image when echoing or printing the
variable with BLOB data using echo $TheBlobData; or print
$TheBlobData;.

In some instances, the query executes, retrieves all rows but only
displays an image, instead of all the images per row.

Storing the images in directories has security issues, other risk and
the BLOB data needs to be stored and pulled directly from the database.


--------------------
Field Name, DataType
---------------------
ID, int
Picture, BLOB
Type, VARCHAR

For example this prints the ID of each row:
while ($rows = mysql_fetch_row($result))
{
echo $rows->ID;
}
and this prints the image Type stored in a field of each row

while ($rows = mysql_fetch_row($result))
{
echo $rows->Type;
}

but this prints each row of the images as binary data but needs to
print actual images:

while ($rows = mysql_fetch_row($result))
{
echo $rows->Picture;
}

When inserting the header() function to describe the image data type,
it only prints an image using the same while loop, in some cases it
simply shows a blank page and echos the address of the page:

while ($rows = mysql_fetch_row($result))
{
header ();
echo $rows->Picture;
}

This requires printing the multiple BLOB data directly as images to a
page for each row in a table and not just an image on the page. For
users of Postgres SQL, is this also an issue and are they open source
databases where BLOB data types can be displayed directly as images by
echoing or printing the BLOB data variable?



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50467&edit=1

Reply via email to