2008年9月22日星期一

Re: [fw-db] natural order sorting in select object

Hi Tony

$select->order(new Zend_Db_Expr('house_number +0 asc'));

will do the job nicely for you!

Cheers

> Heya folks.
>
> I normally make mysql enforce natural order sorting by simply adding
> +0
> prior to the asc clause eg
> order by house_number asc +0
>
> How can i do this with the zend_db_select object?
> $select->order('house_number +0 asc')
> does not work.
> --
> View this message in context: http://www.nabble.com/natural-order-sorting-in-select-object-tp19412845p19412845.html
> Sent from the Zend DB mailing list archive at Nabble.com.
>

--

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

没有评论: