jakebur01 Posted July 31, 2007 Share Posted July 31, 2007 Hey, I put a field on my homepage for users to be able to type in two or three word phrases and products will display simalar results. Here is my current code: $conn = db_connect(); $sql = "SELECT * FROM books "; $sql .= "WHERE `No` LIKE '%$mysearch%' "; $sql .= "OR `description` LIKE '%$mysearch%' "; $sql .= "OR `title` LIKE '%$mysearch%' "; $sql .= "OR `author` LIKE '%$mysearch%' "; $sql .= "OR `isbn` LIKE '%$mysearch%' "; Is their something I might could use in place of this that might would be a little more leniant? This code above is a little to strict. Link to comment https://forums.phpfreaks.com/topic/62596-solved-search-alike-matches/ Share on other sites More sharing options...
deadimp Posted July 31, 2007 Share Posted July 31, 2007 You can look at the MATCH() function for MySQL, and boolean fulltext searches. Link to comment https://forums.phpfreaks.com/topic/62596-solved-search-alike-matches/#findComment-311603 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.