[eluser]TheFuzzy0ne[/eluser]
These functions might work a little better:
Code:
function displayimage($Id=FALSE)
{
if ($Id))
{
$image = $this->MMarches->getImage($Id);
header("Content-type: image/jpeg");
print($image);
}
}
function getImage($Id)
{
$data = '';
$Q = $this->db->query("SELECT MA_PHOTO FROM GERICO.REF_MARCHES WHERE MA_ID=".$Id);
if ($Q->num_rows())
{
$data = $Q->row_array();
$data = $data['MA_PHOTO']
$Q->free_result();
}
return $data;
}
The above code is
untested.