我正在尝试让 Zend DB 生成以下查询:
SELECT DISTINCT
US.nombre AS Cliente,
VE.id_venta,
VE.fecha,
VE.total,
ve.observacion
FROM
usuarios AS US,
ventas AS VE
我已经尝试了下面的代码,但它不起作用:
$select = $this->select();
$select->from(array('VE' => 'ventas'), array('id_venta', 'fecha', 'total', 'observacion'))
->from(array('US' => 'usuarios'),'ve.id_usuario');