MikeDXUNL Posted July 16, 2008 Share Posted July 16, 2008 right now my query is: mysql_query("SELECT * FROM videogames WHERE type='$type' AND gamename LIKE '$letter%' ORDER BY gamename ASC") or die(mysql_error()); is there a way I can exclude 'The' at the beginning of a title. and put it at the end? I.E { Grand Theft Auto IV Halo 3 Incredible Hulk, The } then when the user clicks on the "I" link, Incredible Hulk will show up there instead of in the "T" link Link to comment https://forums.phpfreaks.com/topic/114961-alphabetize-without-the/ Share on other sites More sharing options...
BillyBoB Posted July 16, 2008 Share Posted July 16, 2008 You could just add them to the database like that. And if wanted change with php on display. Link to comment https://forums.phpfreaks.com/topic/114961-alphabetize-without-the/#findComment-591247 Share on other sites More sharing options...
xtopolis Posted July 16, 2008 Share Posted July 16, 2008 You might possibly be able to add a mysql clause to support that: ... LIKE '$letter' OR LIKE '%the%$letter'... Do it on your phpMyAdmin if you have it, I didn't test that statement, but it should work. Link to comment https://forums.phpfreaks.com/topic/114961-alphabetize-without-the/#findComment-591255 Share on other sites More sharing options...
xtopolis Posted July 16, 2008 Share Posted July 16, 2008 Err, mine should only have one % sign, : OR LIKE 'the%$letter' Just to be safe. And it worked in my small test :3 Link to comment https://forums.phpfreaks.com/topic/114961-alphabetize-without-the/#findComment-591262 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.