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_category AS node, nested_category AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.name = 'FLASH' ORDER BY parent.lft; under "Retrieving a Single Path" on the above link) Because my implementation expands that statement to include a bunch of joins, I'd like to use Zend_Db_Select, instead of raw SQL. But I can't figure out how to set multiple from's. I'd expect something like: $select->from( array( 'node'=>nested_category', 'parent'=>nested_category' ) ); But it doesn't work. How would you implement this? Thanks, Corey -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Db-Select-with-multiple-from-s-tp3344822p3344822.html Sent from the Zend Framework mailing list archive at Nabble.com.
