I'm trying to sort a listing of albums alphabetically
for LyricsList.com, the problem is that I want the
initial 'The' and 'A' in some albums (A Hard Days
Night, The Wall) to be ignored. So that the list will
look like: 

Abbey Road 
Dark Side Of the Moon 
The Final Cut 
A Hard Days Night 
Kill 'em All 
The Wall 

ABC order, 'A' and 'The' negated. The info comes from
a database, in three calls: 

// call albums that begin with letter $letter 
$query = "SELECT * FROM albums WHERE album LIKE
'$letter%' ORDER BY album"; 
$result = mysql_query($query) or die(mysql_error()); 

// call albums that begin with letter A 
$query_a = "SELECT * FROM albums WHERE album LIKE 'a'
ORDER BY album"; 
$result_a = mysql_query($query_a) or
die(mysql_error()); 

// call albums that begin with letter T 
$query_t = "SELECT * FROM albums WHERE album LIKE 't'
ORDER BY album"; 
$result_t = mysql_query($query_t) or
die(mysql_error()); 

So I need to get just the albums from $result_t that
begin with 'The ' (easy regex) and from $result_a that
begin with 'A ' (easy regex), but puting the three of
them in order is proving beyond my skill. 

Thanks in advance for any advise. 

Dotan Cohen


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to