Zend Order by Cast with mysql

I am using Zend Framework with a MySQL database.

Can zend select produce something like this ?

SELECT * FROM `abc` ORDER BY CAST( `something` AS SIGNED ), `other` ASC

at the moment i give raw sql query since don't know how to make zend use $select->order(..) and obtain that query...

I'm thinking maybe not all db support this so zend doesn't has it or why ?

Answers


U can use Zend_Db_Expr class instance and pass it to order method


There is no such keyword in zend. We cannot make casting at the time of fetching the data but we can make casting after the fetching the data.


Need Your Help

Android BUILT-IN SD device node where and FileSystem Type?

android embedded-linux fat32

look this information , My Android Device is larger Flash, it use built-in sd card. I can't fond it's device node , and dont' konw it's file system type.

In what way does denormalization improve database performance?

database performance database-design normalization denormalization

I heard a lot about denormalization which was made to improve performance of certain application. But I've never tried to do anything related.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.