Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [macbethgr] Omit leading "The" in sort, but still display it.

Quote Reply
Re: [macbethgr] Omit leading "The" in sort, but still display it. In reply to
Hi,

Not that hard :)

Add a new field called Name2. Then just run a SQL to populate it:

Code:
UPDATE glinks_Category SET Name2 = REPLACE(Name,"The ","");

It seems REPLACE does not let you do a replace using ^ as an anchor to the rule - so if you had something like:

"Something The Fool"

It would convert to:

"Something Fool"

If you do have that, lemme know and I'll knock up a simple script to do it for ya ;) (only a few lines of code)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread Omit leading "The" in sort, but still display it. macbethgr 6378 May 9, 2015, 4:46 AM
Thread Re: [macbethgr] Omit leading "The" in sort, but still display it.
Andy 6299 May 9, 2015, 5:00 AM
Thread Re: [Andy] Omit leading "The" in sort, but still display it.
macbethgr 6296 May 9, 2015, 5:12 AM
Thread Re: [macbethgr] Omit leading "The" in sort, but still display it.
Andy 6294 May 9, 2015, 5:18 AM
Post Re: [Andy] Omit leading "The" in sort, but still display it.
macbethgr 6284 May 9, 2015, 5:28 AM
Post Re: [Andy] Omit leading "The" in sort, but still display it.
macbethgr 6277 May 9, 2015, 5:31 AM
Thread Re: [Andy] Omit leading "The" in sort, but still display it.
macbethgr 6268 May 9, 2015, 5:45 AM
Post Re: [macbethgr] Omit leading "The" in sort, but still display it.
Andy 6265 May 9, 2015, 5:58 AM