RE: Set::sort Help
Great suggestion! Added a "slug" in the db and made all lower case, sorted that then used the"name" to display. Thanks, Dave -Original Message- From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of lowpass Sent: Sunday, October 14, 2012 3:21 PM To: cake-php@googlegroups.com Subject: Re: Set::sort Help Give each company a slug so that they're all normalised to lowercase and sort on that. This would also allow you to have routes like '/companies/:slug' On Sat, Oct 13, 2012 at 6:35 PM, Advantage+ wrote: > I have : > > > > $all[$key] = Set::sort( $master[$key], '{n}.name', 'asc'); > > > > Which sorts my extracts alphabetically. > > Only problem is that it the '{n}.name' in the database are both upper > and lowercase because they are brand / company names so they must be > entered in correct case. > > > > So when it sorts it does the uppercase A-Z then follow the lowercase > a-z. So it is not sorting as I would like. > > Should be Aa - Zz. > > How can it sort so it is not case sensitive? > > > > Thanks, > > Dave > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP Find us on > Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Set::sort Help
Give each company a slug so that they're all normalised to lowercase and sort on that. This would also allow you to have routes like '/companies/:slug' On Sat, Oct 13, 2012 at 6:35 PM, Advantage+ wrote: > I have : > > > > $all[$key] = Set::sort( $master[$key], '{n}.name', 'asc'); > > > > Which sorts my extracts alphabetically. > > Only problem is that it the '{n}.name' in the database are both upper and > lowercase because they are brand / company names so they must be entered in > correct case. > > > > So when it sorts it does the uppercase A-Z then follow the lowercase a-z. So > it is not sorting as I would like. > > Should be Aa - Zz. > > How can it sort so it is not case sensitive? > > > > Thanks, > > Dave > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > 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+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
Set::sort Help
I have : $all[$key] = Set::sort( $master[$key], '{n}.name', 'asc'); Which sorts my extracts alphabetically. Only problem is that it the '{n}.name' in the database are both upper and lowercase because they are brand / company names so they must be entered in correct case. So when it sorts it does the uppercase A-Z then follow the lowercase a-z. So it is not sorting as I would like. Should be Aa - Zz. How can it sort so it is not case sensitive? Thanks, Dave -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- 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+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.