Friday, September 26, 2008

Using COLLATE 'utf8_unicode_ci' for order clause in paginate?

Hi,

Is it possible to add a collation clause in a order clause of
paginate() ?

I've tried those different solutions, but no success:

// tags_controller.php

public function admin_index() {
$this->Tag->recursive = 0;
$this->paginate = array('order' => 'name COLLATE 'utf8_unicode_ci'
ASC');
$this->set('tags', $this->paginate());
}

public function admin_index() {
$this->Tag->recursive = 0;
$this->paginate = array('order' => 'name ASC',
'collate'=>'utf8_unicode_ci' );
$this->set('tags', $this->paginate());
}

public function admin_index() {
$this->Tag->recursive = 0;
$this->paginate = array('order' => array('name'=> 'ASC'),
'collate'=>'utf8_unicode_ci' );
$this->set('tags', $this->paginate());
}

Do you think I can do that with a custom paginate() method in my
model?

Thank's by advance for suggestions.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: