On 02.12.2002 11:40 Uhr, "Oriol Portell - UV" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I'm running MySQL and Perl 5.6 on a Win32 machine. I'm a very
> unexperienced Perl programmer, but I need to build a serach engine for a
> MySQL database which parses the values entered in a text field (in
> simple and advanced query sintaxes similar to those used in Yahoo or
> Altavista) and builds "select" query strings.
> 
> I've had some success using Text-Query and Text-Query-SQL modules from
> cpan. But surprisingly these modules don't suport the use of wildcards
> (or I havn't discovered how to use them) and I can only search for exact
> matches in the database. Can anybody help me?
> 
> Are there alternative modules? I'm not prepared to create my own
> Text-Query parser by using raw regexps by now...
> 
> Thanks,
> 
> Oriol.
> 
> 
> 
If I understand your question you should have to look up some SQL help files
on the web.
What your need is the LIKE statemant. Using it with wildcats '%'
Are you familiar with DBI ?? Take a look at it on www.cpan.org.

The steps:
Connecting to a database ( look at the docs )
Make your sql, like "SELECT id, text, whatever FROM yourtable WHERE text
LIKE '%$variable%'

Then you can fetchrows and printing it.

Hoe this helps
kris

Reply via email to