Minase Posted May 2, 2009 Share Posted May 2, 2009 hy there i was wondering how to filter the search for "bad" words if the bad word is "fu*k" how can i make it,so it match the word "fu*king"? i have this code $result = mysql_query("SELECT * FROM `$dbname`.`{$dbprefix}badwords` WHERE `thebadword` LIKE '%$badie%'", $connection); thank you Quote Link to comment https://forums.phpfreaks.com/topic/156502-mysql-like/ Share on other sites More sharing options...
Yeodan Posted May 2, 2009 Share Posted May 2, 2009 you can use wildcards in SQL like * or ### * meaning any possible set of characters ### meaning any possible 3 characters ... google for sql wildcards Quote Link to comment https://forums.phpfreaks.com/topic/156502-mysql-like/#findComment-824248 Share on other sites More sharing options...
fenway Posted May 4, 2009 Share Posted May 4, 2009 Actually, "_" (underscore) is the single character marker and "%" (percent) is the multi-character marker. Quote Link to comment https://forums.phpfreaks.com/topic/156502-mysql-like/#findComment-826098 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.