Zend Select with self join overwriting fields

前端 未结 3 1690

Posts and comments are stored in the same table. So to get each post and its comments we do this:

    $posts = $this->select()->setIntegrityCheck(false)
           


        
3条回答
  •  鱼传尺愫
    2021-01-27 11:38

    Yeah we've had the same issue, just finished blogging about it: http://www.kintek.com.au/blog/zend-db-and-joins/

    You need to name each field uniquely, it's a known bug in Zend: http://framework.zend.com/issues/browse/ZF-6421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

提交回复
热议问题