You are here: Looking for a search engine that search a mysql database « PHP Programming Language « IT news, forums, messages
Looking for a search engine that search a mysql database

Posted by Martien van Wanrooij on 05/09/06 21:09

I have been using phpdig in some websites but now I stored a lot of larger
texts into a mysql database. In the phpdig search engine, when you entered a
search word, the page where the search word was found was displayed with
about 2 lines before and 2 lines behind the search word itself. Let us say
you look for "peanut butter" an the word is found in a larger text about
sandwiches, even when it is on the 40th line of the text you would get
something like
"www.mysite.com/sandwich.php
....In Holland peanut butter is a popular spread on sandwiches "
A query like "SELECT title, maintext FROM MYTEXTS WHERE maintext LIKE
$searchedword" will do most of the job and I can create a query that
displays only the first 200 characters of maintext, so there will be an
introductory text about sandwiches and our peanut butter lover maybe will
skip this page :)

but I am puzzled about a command that ( either in php or mysql) jumps to
$searchedword in the maintext field and returns a couple of lines around it.
Any ideas? If there is an open source php module that could do this I will
be happy too and maybe I just am overseeing a relatively easy function that
will do the job.. Google-ing to "mysql php search engines" did not give too
many hints.

Thanks for any help.

Thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация