that query will have a bad effect in the MySQL side, because "indexes"
can be used, so it is neccesary make the arhitmetic operation in every
records before order...........
El 23 Sep 2008, a las 04:42, Simon Mundy escribió:
> 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
>
没有评论:
发表评论