Welcome to Geeklog, Anonymous Monday, September 16 2024 @ 04:14 pm EDT

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 EDT. The time is now 04:14 pm.

  • 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