I think someone will feel right in saying that this question is a duplicate, but I disagree, do not have a question that simply and objectively answers a method of displaying an image of a blob in PHP , using Firebird .
From what I was able to gather on the internet. This code seems correct.
if($db = ibase_connect('C:\Banco.FDB', 'sysdba', 'masterkey')){
$result = ibase_query($db, 'SELECT IMAGEM FROM PRODUTO_GALERIA where id = 478');
while ($row = ibase_fetch_object($result)) {
header("Content-type: image/jpeg");
echo $row->IMAGEM;
}
}
A simple query in one of my tables that brings an image as a result (with id 478), but the result is not an image but a small square in the middle of the screen. I tried all methods that I found on the internet and only got compilation errors and this square on the screen.