Re: [fw-general] Zend_Db_Select with multiple from's

2011-03-09 Thread Hector Virgen
On Wed, Mar 9, 2011 at 3:14 PM, gelform wrote: > I can't figure out how to set multiple from's. You can only have one FROM in a SQL query. To join another table, use $select->join($tableName, $arrayOfFields) or $select->join(array($alias => $tableName), $arrayOfFields). The join() method will

[fw-general] Zend_Db_Select with multiple from's

2011-03-09 Thread gelform
For threaded messages in an app I'm building, I'm implementing the Nested Set Model pattern. More details here: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html (scroll half way down) To retrieve a single thread, their sample SQL is this: SELECT parent.name FROM nested_categor