database search engine
Posted: Thu Jul 31, 2003 7:10 am
I am currently working on a php driven website for a client. My php experience is fairly limited. The db is a pretty simple affair - basically, a table of my client's clients - names, some blurb about them, and they would like to attach a MS Word CV to each client. My questions are twofold:
1. They would like a search textfield and button, which would go through the blurb field in the client table an find any relevant matches. Simple enough - however, how would i go about excluding words that may be common to all the records - "the", "a", and so on.
Also, how would I go about splitting up any search terms entered, so if the term entered is "creative director", the search results would return both records with that exact term, but also records with either word? My script at the moment is as follows, but woefully simplistic:
Am I trying to reinvent the wheel here - is there a standard way of doing this that I have overlooked.
2. The other problem that I have I am unsure how to begin tackling. My client insists that all their clients must have their CVs in MS Word format. To ensure browser compatibility and also because, frankly, MS word docs look so sh*t, I would like to use php to parse the text in the documents and them place them on an html page tagged with my own style sheet.
Is there a way I can store these docs in the db (using a BLOB field?), and then parse them - giving that they are all look completely different in design and style?
Thanks for your help, even a couple of relevant links would be much appreciated.
Regards
Craig
1. They would like a search textfield and button, which would go through the blurb field in the client table an find any relevant matches. Simple enough - however, how would i go about excluding words that may be common to all the records - "the", "a", and so on.
Also, how would I go about splitting up any search terms entered, so if the term entered is "creative director", the search results would return both records with that exact term, but also records with either word? My script at the moment is as follows, but woefully simplistic:
Code: Select all
$strSQL = "SELECT firstname, lastname, blurb FROM emps WHERE blurb LIKE '%" . $searchTerm . "%'";2. The other problem that I have I am unsure how to begin tackling. My client insists that all their clients must have their CVs in MS Word format. To ensure browser compatibility and also because, frankly, MS word docs look so sh*t, I would like to use php to parse the text in the documents and them place them on an html page tagged with my own style sheet.
Is there a way I can store these docs in the db (using a BLOB field?), and then parse them - giving that they are all look completely different in design and style?
Thanks for your help, even a couple of relevant links would be much appreciated.
Regards
Craig