Click Fraud Protection
PHP related blog, freelancer to hire!

Posts Tagged zend_db_table

Zend Paginator – how to access objects, not data only

If you’re using Zend_Paginator, I’m sure on some point you’ll need to access your object instead of only data.   First of all you need to have your Zend_Db_Table defined with rowchild, for example if your table class is App_Model_Db_Books, add this variable protected $_rowClass = ‘App_Model_Db_Books_Row’; […]

Read more

Zend_db_table how to find row by multiple columns?

Maybe should dig more in ZF API, but found simple solution: class YourClass extends Zend_Db_Table_Abstract { public function findOneByParams(array $params) { // prepare query $query = $this->select(); // add our terms foreach ($params as $param => $value) { $query->where($param.’ = ?’, $value); } // find row $row […]

Read more