adrek Posted May 27, 2009 Share Posted May 27, 2009 Ok here is my problem. I need to pull values from a database starting with a letter. here is my query SELECT * FROM titles WHERE name LIKE '%$letter' i have a couple names that start with 'the' and other common words. is there any way to ignore that? like for example. "The Lord of the Rings" would show up under 'L' as oppose to 'T'. Quote Link to comment https://forums.phpfreaks.com/topic/159803-solved-ignoring-comman-words-while-getting-results-from-a-database-query/ Share on other sites More sharing options...
corbin Posted May 27, 2009 Share Posted May 27, 2009 As far as I know, you would have to do full out fulltext searching. Quote Link to comment https://forums.phpfreaks.com/topic/159803-solved-ignoring-comman-words-while-getting-results-from-a-database-query/#findComment-842888 Share on other sites More sharing options...
adrek Posted May 27, 2009 Author Share Posted May 27, 2009 damn, ok thanks. Quote Link to comment https://forums.phpfreaks.com/topic/159803-solved-ignoring-comman-words-while-getting-results-from-a-database-query/#findComment-843443 Share on other sites More sharing options...
fenway Posted June 2, 2009 Share Posted June 2, 2009 damn, ok thanks. Or you can work around this during the INSERT stage and make it really easy. Quote Link to comment https://forums.phpfreaks.com/topic/159803-solved-ignoring-comman-words-while-getting-results-from-a-database-query/#findComment-847722 Share on other sites More sharing options...
adrek Posted June 17, 2009 Author Share Posted June 17, 2009 yea thats what i did. i used substrings to check if the title started with 'the' and just put it at the end and seperate it with a comma. thanks Quote Link to comment https://forums.phpfreaks.com/topic/159803-solved-ignoring-comman-words-while-getting-results-from-a-database-query/#findComment-857678 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.