0
我有查询:如何仅从相关表中获取特定列?
$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?
是的,但我也得从TABLE_3,TABLE_1和TABLE_2等领域... – Nips 2013-03-10 09:59:20
尝试更换'” *''在'joins'中加入'array()',你不想从中选择列 – Crisp 2013-03-10 10:15:32