rashmi_k28 Posted October 6, 2008 Share Posted October 6, 2008 Hi, How to add the search a word from my website. Not the google's search. Please provide me the idea or any links how to implement this technique. Quote Link to comment https://forums.phpfreaks.com/topic/127214-search/ Share on other sites More sharing options...
waynew Posted October 6, 2008 Share Posted October 6, 2008 $string = mysql_real_escape_string($string); mysql_query("SELECT * FROM tablename WHERE columname LIKE '%$string%'") or die(mysql_error()); Hope that helps. Quote Link to comment https://forums.phpfreaks.com/topic/127214-search/#findComment-658002 Share on other sites More sharing options...
rashmi_k28 Posted October 6, 2008 Author Share Posted October 6, 2008 Hey I word is not stored in the database. It is like a search button which is in most of the websites. When characters are entered in the search text box, it displays the pages which contains that word within the web site Quote Link to comment https://forums.phpfreaks.com/topic/127214-search/#findComment-658003 Share on other sites More sharing options...
JonnoTheDev Posted October 6, 2008 Share Posted October 6, 2008 How can it possibly know the pages if the page text is not stored anywhere? Quote Link to comment https://forums.phpfreaks.com/topic/127214-search/#findComment-658155 Share on other sites More sharing options...
dennismonsewicz Posted October 6, 2008 Share Posted October 6, 2008 you could use an indexing script like this one: http://www.sphider.eu/index.php You need a DB tbl setup to run the actual program but it indexes your site instead of using a DB for the search to work Quote Link to comment https://forums.phpfreaks.com/topic/127214-search/#findComment-658158 Share on other sites More sharing options...
JonnoTheDev Posted October 6, 2008 Share Posted October 6, 2008 Lucene can do this. Part of the Zend Framework. Requires no db, uses file storage. Will need to implement methods of updating the index. Quote Link to comment https://forums.phpfreaks.com/topic/127214-search/#findComment-658174 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.