如何从相关表中获取特定列?

时间:2013-03-09 22:01:21

标签: zend-framework zend-framework2 zend-db

我有疑问:

$sql = new Sql($this->tableGateway->getAdapter());
$select = $sql->select();

$select->from('table_1')
    ->join('table_2', 'table_2_se_id = table_2.se_id 
                       and table_2_table_3_id = table_2.table_3_id',
                      '*', 'LEFT')
    ->join('table_3', 'table_2_table_3_id=table_3.id', '*', 'LEFT')
    ->join('table_4', 'table_4_id=table_4.id', '*', 'LEFT');

如何从table_4只获取一列(例如'name')?

0 个答案:

没有答案