It's a new feature added by Bill in more recent commits. You have to add a new Zend_Db_Expr object to avoid a string being quoted.

So your query becomes:-

$select->joinLeft( array('users'=>'e'), 'j.journal_execute_id = e.user_id', new Zend_Db_Expr('user_surname AS execute_surname') );

Thanks, it's work fine in last ZF snapshot .

And little question : how now create alias for table column ?

If i write :

$select->joinLeft( array('users'=>'e'), 'j.journal_execute_id = e.user_id', array('user_surname AS execute_surname') );

get MySQL error : Unknown column 'e.user_surname AS execute_surname' in 'field list'" , because ZF quote field name.

--

Simon Mundy | Director | PEPTOLAB

""" " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "
202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
http://www.peptolab.com


Reply via email to