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 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 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. Link to comment https://forums.phpfreaks.com/topic/156502-mysql-like/#findComment-826098 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.