Alphabetical order and the word "The"
            5 posts by 3 authors in: Forums > CMS Builder
Last Post: April 29, 2010   (RSS)          
By zip222 - April 29, 2010
thanks.
Re: [zip222] Alphabetical order and the word "The"
By Dave - April 29, 2010
So you just want it sorted as if there was no "The " in the name? Is that correct? Any other special conditions? And can you give a short example of the sample sorting output you'd like to see?
Thanks!
interactivetools.com
Re: [Dave] Alphabetical order and the word "The"
By zip222 - April 29, 2010
  list($corporations_foundationsRecords, $corporations_foundationsMetaData) = getRecords(array(
    'tableName'   => 'corporations_foundations',
    'allowSearch' => '0',
  ));<?php foreach ($corporations_foundationsRecords as $record): ?>
	<li><?php echo $record['organization_name'] ?>" /></li>
<?php endforeach ?>Re: [zip222] Alphabetical order and the word "The"
By Jason - April 29, 2010
Give this a try:
 list($corporations_foundationsRecords, $corporations_foundationsMetaData) = getRecords(array( 
    'tableName'   => 'corporations_foundations', 
    'allowSearch' => '0', 
    'orderBy' => "SUBSTRING_INDEX(organization_name,'The',-1)",
  ));This will organize the names as if there the word "The" was not there.
Hope this helps.
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Alphabetical order and the word "The"
By zip222 - April 29, 2010
But I figured out the problem. You also need to include the space after the "The", like this... 'The '
thanks!