problem by displaying images stored in a MySQL database?

Posted by user1400 on Stack Overflow See other posts from Stack Overflow or by user1400
Published on 2011-02-27T06:32:39Z Indexed on 2011/02/27 7:24 UTC
Read the original article Hit count: 112

Filed under:
|

i have images in my blob field in database i use blow colde for displaying image but it does not show any pic , someone could tell me where is my wrong?

this is my model:

public function getListUser() {

         $select = $this->select()
                    ->order('lastname DESC');
      $adapter = new Zend_Paginator_Adapter_DbTableSelect ($select);
        return $adapter;
    }

this my controller:

$userModel = new Admin_Model_User();
$adapter = $userModel->getListUser();
$paginator = new Zend_Paginator ($adapter);
$paginator->setItemCountPerPage(1);
$page = $this->_request->getParam('page', 1);
$paginator->setCurrentPageNumber($page);
$this->view->paginator = $paginator;

this my view code:

<td style="width: 20%;">  <?php
     echo $this->lastname  ?> </td>

<td style="width: 20%;"><?php    header("Content-type: image/gif"); print $this->image;  ?></td>

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework