Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: DBI search for forward slash

by Corion (Pope)
on Nov 08, 2020 at 08:08 UTC ( #11123490=note: print w/replies, xml ) Need Help??


in reply to Re^2: DBI search for forward slash
in thread DBI search for forward slash

But = only compares for identity. You want LIKE, and you want the % placeholder:

SELECT * FROM `texts` WHERE `string` LIKE '%/a/b/c%'

... or, with placeholders:

SELECT * FROM `texts` WHERE `string` LIKE ?

(and then in the ->execute() call, add the placeholders to your search string)

Replies are listed 'Best First'.
Re^4: DBI search for forward slash
by luxs (Beadle) on Nov 08, 2020 at 08:33 UTC
    LIKE is fail as well

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (1)
As of 2021-05-19 03:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (186 votes). Check out past polls.

    Notices?