Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: DBD-SQLite Regexp

by kennethk (Abbot)
on Nov 26, 2012 at 18:08 UTC ( #1005732=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    SELECT  ID,
            sentence  
    FROM    texts
    WHERE   sentence LIKE '% $query %'
    
  2. or download this
    SELECT  ID,
            sentence  
    FROM    texts
    ...
       OR   sentence LIKE '$query %'
       OR   sentence LIKE '% $query'
       OR   sentence = '$query'
    
  3. or download this
    SELECT  ID,
            sentence  
    FROM    texts
    WHERE   sentence LIKE '%$query%'
    
  4. or download this
    my $sth = $dbh->prepare(<<'EOSQL');
    SELECT  ID,
            sentence  
    ...
    while (my @row = $sth->fetchrow_array) {
        push @$results, \@row if $row[1] =~ /\b\Q$query\E\b/;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-28 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls