problem by displaying images stored in a MySQL database?
- by user1400
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>