Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 07:01 am EST

Geeklog Forums

excluding "the" in alphabetical listing of links


Status: offline

JohnnyWormtown

Forum User
Junior
Registered: 05/30/04
Posts: 23
excuse my newness to PHP, but I've had a request to exclude the word "The" in the alphabetical order of my links and I agree that this would be a good idea (especially in my case where my links are almost all band names).

I know this will involve some sort of text replacing and such, but I was thinking that someone might have already done this and/or someone here could give me some guidance.
 Quote

Status: offline

JohnnyWormtown

Forum User
Junior
Registered: 05/30/04
Posts: 23
figured this out by myself, too:

added something to my db query:

...,title,if(left(title,4)='the ',right(title,length(title)-4),title) AS alph,hits,...

and then changed the ORDER by to use alph instead of title.


Now the users want me to sort solo artists by their last name! They're never satisfied!
 Quote

All times are EST. The time is now 07:01 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content