Re: MySQL: Alphabetizing title results in library format
| From: | Bill Morrow | Date: | Thu, 01 Nov 2001 18:30:14 +0000 |
| Subject: | Re: MySQL: Alphabetizing title results in library format | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-13919@lists.php.net to get a copy of this message | ||
On Thu, Nov 01, 2001 at 04:43:00AM -0500, Ian Evans wrote:
> Cami wrote:
>
> > Try this:
> > mysql> select *,(case when title like '%The%' then substring (title, 5, 255)
> > when title like '%A%' then substring (title, 3, 255) when title like
> > '%An%'
> > then substring (title, 4, 255) else title end) as sort_col from titles order
> > by sort_col;
>
> Argh, that still produces the same syntax error. Our hosting company is
> using MySQL 3.22.32 if that's any help.
>
> --
> Ian Evans
> Digital Hit Entertainment - News and Information
> http://www.digitalhit.com
>
I would do this in the php layer.