Why not have another field - without the "The" in? :) That'd by far be the easiest (and most efficient) way to do it.
Alternatively, you could try this (not tested, so may not even work!)
Hope that helps
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!
Alternatively, you could try this (not tested, so may not even work!)
Code:
$sth = $db->select( ["ID","Name", "Full_Name","case when Name like 'The %' then trim(substr(Name from 4)) else Name end as Name2"] );Hope that helps
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!