Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: regex search

by Lachesis (Friar)
on Jul 09, 2003 at 09:30 UTC ( [id://272630]=note: print w/replies, xml ) Need Help??


in reply to regex search

As it is your code will give an error because of the unterminated substitution. It won't create valid sql and would actually do an all keywords match only. you want to try something along the lines of
$sql_stmt = "select * from database where 1=1"; #This is how I would do the match in Postgresql #Check your DB docs for the correct syntax my $matchstring = join ' OR ', map { "PlantDescription ~ ".$dbh->quot +e($_)} @keywords; $sql_stmt .= ' AND '.$matchstring if $matchstring;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272630]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found