> Member::findByLetter() uses this condition:
> "lower(left(Member.last_name, 1)) = '${letter}'"
> I avoided using LIKE because I only want to look at the first letter, anyway.
This sounds like a bad idea for large tables. Assuming you have an
index on the `last_name` field, if you use this...
I have something which does that. But it displays all names for a
given letter, rather than using a paging limit. I can't figure out a
clean way to do both.
public function index($letter = null)
{
$letter = is_null($letter) ? 'a' : strtolower((string) $letter);
$this->set
You would have to do it yourself in the conditions of the $paginate
property. Im not sure if this will work, but something like:
$this->paginate['Model']['conditions']['Model.name LIKE'] = '%'.
$letter;
--~--~-~--~~~---~--~~
You received this message because you ar