[eluser]FabD[/eluser]
I think that the code that I ran is very closed to the one you proposed ;-)
into the controller :
Code:
function displayimage($id=FALSE){
echo 'AAAAAAAAAAA' ;
if ($id) {
$image = $this->MMarches->getImages($Id);
header("Content-type: image/jpeg");
print($image);
}
}
into the model :
Code:
function getImage($Id){
$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 (isset($data)) ? $data : '';
}
It doesn't display the first line of displayimage() : echo 'AAAAAAAAAAA' ;
So, in my opinion, this method is never reached.
Why ? that's the question ...