scrubbicus Posted March 4, 2009 Share Posted March 4, 2009 Hey, I'm trying to find a decent script that I can take a look at and find out how I might go about coding one of these. Is there a way to make a search script purely out of PHP; or maybe out of purely some other language? This search would only search the website for any relevant queries. Link to comment https://forums.phpfreaks.com/topic/147877-php-search/ Share on other sites More sharing options...
WolfRage Posted March 4, 2009 Share Posted March 4, 2009 There are tons of them just google "php search site" . Then start checking over your options add Open Source if you want to see the code. Link to comment https://forums.phpfreaks.com/topic/147877-php-search/#findComment-776126 Share on other sites More sharing options...
The Little Guy Posted March 4, 2009 Share Posted March 4, 2009 I do it like this: $trimmed = trim($_GET['q']); $query = "SELECT *,code,name, MATCH(code) AGAINST ('$trimmed' IN BOOLEAN mode) AS score1, MATCH(name) AGAINST ('$trimmed' IN BOOLEAN mode) AS score2 FROM snippets WHERE MATCH(code,name) AGAINST ('$trimmed' IN BOOLEAN mode) ORDER BY score1 DESC, score2 DESC"; Link to comment https://forums.phpfreaks.com/topic/147877-php-search/#findComment-776153 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.