2008年12月11日星期四

Re: [fw-db] Index results by specific column name

On Thu, Dec 11, 2008 at 11:19 AM, Nikos Dimopoulos <nikos@niden.net> wrote:
> I believe something like this will work:
> $u = new Users();
> $results = $u->fetchAll($u->select()->order('name'));
>
> $users = $results->toArray();
> (Not tested but it should work).
> Users is a class that extends Zend_Db_Table_Abstract with a $_name = 'User'

This doesn't work. Even if it did try to make the column specified in
the order as the key index, there's no reason why that would be
unique. Any other ideas?

-=Dan

没有评论: