Tuesday, 10 September 2013

Fetch data from data base table in zend framework

Fetch data from data base table in zend framework

I am new to zend frame framework, and in the process of learning. I want
to know that how we can fetch whole data of a table in zend framework and
display it on the screen. I saw lots of tutorials but can't understand the
logic behind this.
If someone can give me small tutorial regarding this that would be very
helpful.
I am using these classes
Model
Application_Model_DbTable_Form extends Zend_Db_Table_Abstract{
protected $_name = 'register';
protected $_primary = 'firstName';
}
class Application_Model_Sign {
private $_dbTable;
public function __construct() {
$this->_dbTable = new Application_Model_DbTable_Form();
}
}
Controller
public function outAction() {
//action body
}
View
<html>
<body>
<table>
<tr>
<th>First Name</th>
<th>Middle Name</th>
<th>Last Name</th>
<th>Gender</th>
<th>Job Type</th>
</tr>
</table>
</body>
</html>

No comments:

Post a Comment