On 6/6/03 at 7:19 PM, [EMAIL PROTECTED] wrote:

> Dear Scot,
> 
> > I don't know if you realize that you just wrote an SQL statement.
> > Have you considered putting all of this in a DB? Use the DB to do
> > the searching and sorting, and Perl to display the results.
> 
> I must confess I did not realize that. I am just beginning to write
> cgi-scripts based on Perl - and I have not worked myself into the
> possibilities of working with databases yet. I just use flat two
> flat files with the exact number of lines in both of them and
> align them according to the hits I get that I derive from the
> Query_String.
> 
> Does anybody see chance of avoiding databases and using 
> a SQL-like statement such as NOT?
> 

I deleted your initial post(heh) so my apologies if this does not answer
your question, but...

It's common for searches to allow things like:
    +hello      - forces 'hello' to be in returned results
    -goodbye    - won't include results with 'goodbye'

Why not use something like this? Parse the query for special characters
and adjust your matching accordingly. Have you checked CPAN? I'd be
shocked if there isn't a module that would do 90% of what you want.

Andrew


--

  This post is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  Any code 
  contained herein is likely UNTESTED and may cause your system 
  to explode upon execution.  Furthermore, please be advised that
  I am really just a Perl ninny, and you probably should not be 
  taking my advice in the first place.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to