Studyon Minte9.com
ZF 1.0

Study

Query



Use Zend_Db_Select when you need to build a query procedurally.

class Models_Catg extends Zend_Db_Table {

....

$sql = $this->select()
        ->setIntegrityCheck(false)
	->from(array('t1' => 'catg'))
	->joinLeft(array('t2' => 'catg_path'), 't2.descendant = t1.id')
	->where('t1.id = ?', 1)
        ;
$data = $this->fetchRow($sql);

...

}


http://stackoverflow.com/questions/1050104/zend-framework-query
http://framework.zend.com/manual/en/zend.db.select.html