Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
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?
[ambrus]: Corion: re stops the timer, sure, but stopping won't erase events already queued, right?
[ambrus]: really I don't know how it works

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2016-12-09 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.