Zend FrameWork: Join Query Not working
- Sunday, July 25th, 2010 -
While creating a SQL query in ZF I kept getting an error with my joins. I was able to fiz this using the code below.
$fooTable = new DbTable_Foo();
$select = $fooTable ->select(Zend_Db_Table::SELECT_WITH_FROM_PART);
$select->setIntegrityCheck(false) //Set integrity check is what did the trick for me.
->join('foo', 'bar.id = foo.id')
->where('foo.id = '.id);
$fooRowset = $this->getDbTable()->fetchAll($select);
