in reply to How can i parse google-like search strings?

I haven't tried it, but you might find SQL::Statement useful.

  • Comment on Re: How can i parse google-like search strings?

Replies are listed 'Best First'.
Re^2: How can i parse google-like search strings?
by pernod (Chaplain) on Jul 01, 2005 at 09:46 UTC

    I realize that my question was poorly phrased. SQL::Statement would be useful in this context, but it takes care of the second part of the problem. Namely generating the SQL.

    As bart helpfully pointed out, the thing I'm searching for is a widget that translates the value of $cgi->param("search_field") into a data structure that can be fed to something like SQL::Statement.

    Thank you for your suggestion, though :)

    pernod
    --
    Mischief. Mayhem. Soap.

        Ah! I (think I) get it. As long as I want to construct SQL, and my search strings look a lot like SQL in the first place. Why not let an SQL-something parse my search strings as they'll end up as my WHERE clauses anyway? SQL::Statement::Structure looks promising.

        Never under-estimate the Monastery's ability to open your eyes (and gently point you to TFM). Pardon me for being dense, and thank you again.

        pernod
        --
        Mischief. Mayhem. Soap.