joeshacks Posted April 20, 2007 Share Posted April 20, 2007 so here's my problem.. i'm trying to search a large database that contains words like jalapeno, but the n in jalapeno has a ntilde, like jalapeño.. but it would make since when someone searches for jalapeno it should also find all the words that have the html entity as well.. so i am currently doing a sql select like.. select * from tbl where REPLACE(col, 'ñ', 'n') like '%jalapeno%'; is there a way to do this similar kind of thing with full-text searches? Quote Link to comment https://forums.phpfreaks.com/topic/47913-mysql-full-text-search-with-html-entities/ Share on other sites More sharing options...
fenway Posted April 20, 2007 Share Posted April 20, 2007 You shouldn't be storing HTML entities in your DB. Quote Link to comment https://forums.phpfreaks.com/topic/47913-mysql-full-text-search-with-html-entities/#findComment-234210 Share on other sites More sharing options...
bubblegum.anarchy Posted April 20, 2007 Share Posted April 20, 2007 Save some space and time with a query that converts all existing entities to their equivalent characters. Quote Link to comment https://forums.phpfreaks.com/topic/47913-mysql-full-text-search-with-html-entities/#findComment-234351 Share on other sites More sharing options...
fenway Posted April 22, 2007 Share Posted April 22, 2007 Not just that, but with a proper charset conversion in the query, you should be able to solve your query issue. Quote Link to comment https://forums.phpfreaks.com/topic/47913-mysql-full-text-search-with-html-entities/#findComment-235354 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.